zhongrj
2023-06-27 d74b495736f0c04522ec54274b70fed0ded2878d
public/map/controls/toolbar/tools/ErrCorrectButton.js
New file
@@ -0,0 +1,33 @@
/**
 * 纠错按钮
 *
 * @author haoml
 */
define([ "dojo", "dojo/_base/declare", "base/AppEvent","dojo/_base/lang","dojo/dom-style",
      "controls/toolbar/tools/BaseTool" ], function(dojo,
      declare, AppEvent, lang, domStyle, BaseTool) {
   var RL = declare([BaseTool],
         {
            _map:null,
            constructor : function(args) {
               this._normalIconClass = "tool-errcorrect-normal";
               this._overIconClass = "tool-errcorrect-over";
               this._selectedIconClass = "tool-errcorrect-select";
               this._disableClass = "";
               this.tooltip = "地图纠错";
               this._map = args.map;
            },
            deactivate : function() {
               this.inherited(arguments);
               domStyle.set(dojo.byId(this._map.id + "_layers"),"cursor","default");
               AppEvent.dispatchAppEvent(AppEvent.ERR_CLOSE);
            },
            activate : function() {
               this.inherited(arguments);
               AppEvent.dispatchAppEvent(AppEvent.ERRCORRECT_RUN);
               domStyle.set(dojo.byId(this._map.id + "_layers"),"cursor","crosshair");
            }
         });
   return RL;
});