123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- /**
- * [ATLAS.M.pcLayout]
- * @return {[object]}
- */
- define([
- 'html!templates/layout',
- 'css!styles/layout',
- // 'layoutDir/noteBar'
- ], function(tplLayout) {
- /**
- * 模块数据 用于数据存储和外部调用
- * @type {Object}
- */
- var modValue = {}
- /**
- * 模块界面样式 例如:宽,高
- * @type {Object}
- */
- var styles = {}
- /**
- * 模块状态,用于存储模块的状态 例如:收起,关闭
- * @type {Object}
- */
- var status = {}
-
- /**
- * 加载布局 初始化
- * 先加载 CSS,html,html事件,地图,地图控件
- * @type {Function}
- * @returns {*}
- */
- function init() {
- setLayout();
- };
- /**
- * [layoutResize description]
- * 设置布局
- */
- function setLayout() {
- $('body').append(tplLayout);
- switch(loadMod){
- case 'atlasCategory':
- require(['modDir/atlas/atlasCategory'], function (atlasCategory) {
- atlasCategory.init();
- });
- break;
- case 'atlasView':
- require(['modDir/atlas/atlasView'], function (atlasView) {
- atlasView.init();
- });
- break;
- }
-
- };
- /**
- * 界面事件绑定
- * @return {[type]} [description]
- */
- function bindEvent(){}
- /**
- * 界面重置
- * @return {[type]} [description]
- */
- function layoutResize() {};
- /**
- * 注册订阅
- * @type {Function}
- * 推送:ONEMAP.C.publisher.publish(options,'atlasList::type');
- * 订阅:ONEMAP.C.publisher.subscribe(layoutResize,'sideBarLayoutChange');
- */
- function subscribe() {}
- /**
- * 取消订阅
- * @type {Function}
- * 取消订阅:ONEMAP.C.publisher.unSubscribe(layoutResize,'sideBarLayoutChange');
- */
- function unSubscribe() {}
- /**
- * 模块移除
- * @return {[type]} [description]
- */
- function remove() {
- //取消订阅
- unSubscribe();
- }
- return ATLAS.M.pcLayout = {
- init: init
- };
- });
|