zhongrj
2023-06-27 d74b495736f0c04522ec54274b70fed0ded2878d
public/map/controls/toolbar/tools/ClearTool.js
New file
@@ -0,0 +1,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;
});