赣州市洪水风险预警系统二维版本
xiebin
2023-03-02 b39483c96ae572121d3c619c0b9d37634e682cc4
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
/**
 * 标记按钮
 * @author liuyl 2015-10-26
 **/
define([
    "base/AppEvent",
    "dojo",
    "dojo/_base/declare",
    "dojo/_base/lang",
    "controls/toolbar/tools/BaseTool",
    "dojo/dom-style",
    "base/ConfigData"
], function(
    AppEvent,
    dojo,
    declare,
    lang,
    BaseTool,
    domStyle,
    Configdata
) {
    var RL = declare([BaseTool], {
        _map:null,
        constructor: function(args) {
            this._normalIconClass = "tool-swipe-normal";
            this._overIconClass = "tool-swipe-over";
            this._selectedIconClass = "tool-swipe-select";
            this._disableClass="";
            this.tooltip="地图标记";
            this._map=args.map;
        },
        activate: function(args) {
            this.inherited(arguments);
            domStyle.set(dojo.byId(this._map.id+"_layers"),"cursor","crosshair");
            AppEvent.dispatchAppEvent(AppEvent.RUN_WIDGET,"SwipeWidget");
        },
        postCreate: function() {
            this.inherited(arguments);
        },
        deactivate: function() {
            this.inherited(arguments);
            AppEvent.dispatchAppEvent(AppEvent.SG_CLOSE);
            domStyle.set(dojo.byId(this._map.id+"_layers"),"cursor","default");
            AppEvent.dispatchAppEvent(AppEvent.CLOSE_WIDGET,"SwipeWidget");    
            //this.inherited(arguments);
        }
    });
    return RL;
});