1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
| /**
| * widget基类
| * @author Wenyb
| * @date 2015/6/30
| */
| define([
| "dojo/_base/declare",
| "base/BaseControl",
| "base/ConfigData",
| "base/AppEvent",
| "dojo/domReady!",
| ], function (
| declare,
| BaseControl,
| ConfigData,
| AppEvent
| ){
| var Widget = declare("BaseWidget",[BaseControl],
| {
| widgetName:"BaseWidget",
| label:"widget基类",
| moudleId:"0",
| /**
| * 部件的布局类型:top:顶部布局、sider:侧面布局、cover:浮动在地图显示区域的布局
| */
| widgetLayoutType:"",
| _isOpen:false,
| constructor:function(options)
| {
| declare.safeMixin(this, options);
| },
| startup:function()
| {
| this.inherited(arguments);
| AppEvent.dispatchAppEvent(AppEvent.WIDGET_LOADED,{name:this.id,instance:this});
| },
| /**
| * Widget打开
| * @return boolean
| */
| open:function()
| {
| this.show();
| this._isOpen=true;
| AppEvent.dispatchAppEvent(AppEvent.WIDGET_OPENED,{name:this.id,instance:this});
| },
| /**
| * Widget关闭
| * @return boolean
| */
| close:function()
| {
| if(ConfigData.selectLayer!=null){
| this.map.removeLayer(ConfigData.selectLayer);
| }
| ConfigData.selectLayer==null;
| this.hide();
| this._isOpen=false;
| AppEvent.dispatchAppEvent(AppEvent.WIDGET_CLOSED,{name:this.id,instance:this});
| },
| /**
| * 是否需要验证用户权限
| * @return boolean
| */
| confirmUserRight:function()
| {
| return false;
| }
| });
| return Widget;
| });
|
|