/** * 纠错按钮 * * @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; });