zengh
2022-06-13 7973e449e74aab353d632e0db2937b376d45a6be
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
/**
 * @author 刘玉麟 2015-11-27
 **/
define([
    "dojo",
    "dojo/_base/declare",
    "base/AppEvent",
    "controls/toolbar/tools/BaseTool",
    "dojo/dom-style"
], function(
    dojo,
    declare,
    AppEvent,
    BaseTool,
    domStyle
) {
    var RL = declare([BaseTool], {
        constructor: function(args) {
            this._normalIconClass = "tool-clear-normal";
            this._overIconClass = "tool-clear-over";
            this._selectedIconClass = "tool-clear-select";
            this._disableClass = "";
            this.tooltip = "清空";
        },
        deactivate: function(args) {
            this.inherited(arguments);
        },
        activate: function() {
            AppEvent.dispatchAppEvent("clearcolor",{});
            this.inherited(arguments);
            AppEvent.dispatchAppEvent(AppEvent.APPLICATION_CLEAR);
            this.deactivate(null);
            this.ondeactivate();
        },
        postCreate: function() {
            this.inherited(arguments);
        }
    });
    return RL;
});