/** * 位置查询工具 * @author Tengzh 2018-11-21 **/ define([ "dojo/_base/declare", "controls/toolbar/tools/BaseTool", "dojo/dom-style", "dojo/dom-construct", "dijit/popup" ], function( declare, BaseTool, domStyle, domConstruct, popup ) { var RL = declare([BaseTool], { _tooltip: null, graphic: null, _symbol: null, constructor: function(args) { this._normalIconClass = "tool-location-normal"; this._overIconClass = "tool-location-over"; this._selectedIconClass = "tool-location-select"; this.tooltip = "位置查询"; }, postCreate: function() { this.inherited(arguments); /* domStyle.set(this.tool, "border-top-right-radius", "5px"); domStyle.set(this.tool, "border-bottom-right-radius", "5px"); domStyle.set(this.tool, "margin-right", "10px");*/ }, activate: function() { this.inherited(arguments); dijit.Tooltip.defaultPosition = ["below"]; popup.open({ popup: domConstruct.create('span',{ innerHTML:'位置查询' }), around: this.domNode }); }, deactivate: function() { this.inherited(arguments); popup.close(this._tooltip); }, }); return RL; });