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
41
42
43
44
45
46
47
48
49
50
| /**
| * 位置查询工具
| * @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;
| });
|
|