ol-contextmenu 5.1.3 → 5.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ol-contextmenu.css +2 -2
- package/dist/ol-contextmenu.js +190 -231
- package/dist/ol-contextmenu.umd.cjs +3 -3
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
package/dist/ol-contextmenu.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
|
-
* ol-contextmenu - v5.1.
|
|
3
|
+
* ol-contextmenu - v5.1.4
|
|
4
4
|
* https://github.com/jonataswalker/ol-contextmenu
|
|
5
|
-
* Built: Mon Dec 26 2022
|
|
5
|
+
* Built: Mon Dec 26 2022 21:16:02 GMT-0300 (Brasilia Standard Time)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
.ol-ctx-menu-container{position:absolute;padding:8px;background:#fff;color:#222;font-size:13px;border-radius:5px;box-shadow:#0003 3px 3px 5px;box-sizing:border-box}.ol-ctx-menu-container div,.ol-ctx-menu-container span,.ol-ctx-menu-container a,.ol-ctx-menu-container img,.ol-ctx-menu-container ul,.ol-ctx-menu-container li{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.ol-ctx-menu-container a img{border:none}.ol-ctx-menu-container *,.ol-ctx-menu-container *:before,.ol-ctx-menu-container *:after{box-sizing:inherit}.ol-ctx-menu-container.ol-ctx-menu-hidden{opacity:0;visibility:hidden;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container ul{list-style:none}.ol-ctx-menu-container li{position:relative;line-height:20px;padding:2px 5px;white-space:nowrap}.ol-ctx-menu-container li:not(.ol-ctx-menu-separator):hover{cursor:pointer;background-color:#333;color:#eee}.ol-ctx-menu-container li.ol-ctx-menu-submenu .ol-ctx-menu-container{border:1px solid #eee;padding:8px;top:0;opacity:0;visibility:hidden;transition:visibility 0s linear .3s,opacity .3s}.ol-ctx-menu-container li.ol-ctx-menu-submenu:after{position:absolute;top:7px;right:10px;content:"";display:inline-block;width:.6em;height:.6em;border-right:.3em solid #222;border-top:.3em solid #222;transform:rotate(45deg)}.ol-ctx-menu-container li.ol-ctx-menu-submenu:hover:after{border-color:#eee}.ol-ctx-menu-container:not(.ol-ctx-menu-hidden) li.ol-ctx-menu-submenu:hover>.ol-ctx-menu-container{opacity:1;visibility:visible;transition-delay:0s}.ol-ctx-menu-container li.ol-ctx-menu-separator{padding:0}.ol-ctx-menu-container li.ol-ctx-menu-separator hr{border:0;height:1px;background-image:linear-gradient(to left,rgba(0,0,0,0),rgba(0,0,0,.75),rgba(0,0,0,0))}.ol-ctx-menu-icon{text-indent:20px;background-size:20px auto;background-repeat:no-repeat;background-position:left center}.ol-ctx-menu-zoom-in{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABaUlEQVQ4T72U7VHCQBCGn90GtAMuNGCswFiBWIFQgWMFxg6wArECsQKhArEBiB1Qwa1zgQn5IAYcxv13k71n3919L8KJQ07M47+BzgG9TRfZ/JBuWhS6BJFHRJICYrZGZIz3z5Ct2+B7gG6I6kt+wewdkQVwjtkAkR5mC8yu26A1oItR/cTsOweQBdgutD8G7jGm2PJ2n8oqUKIpIjd4HxTM8gvaT/F+AlmWnyWaIXKF95eNguFzTYFhNsdWu9kFgFlaFMANUH3D8wDLoLgSTSD2il8NCe2ZXQBxWDGwxmyUzzOMBZ7wy7Qb2K0wQfXjMOBuhlFpZtNty5sFaTQBuTusZdymeqs1SpYKcO9HkE3KbTd9WFijMHJQ5hBNEAYNq5Qd0dhyke0GiE4QzjqfW23mHT8Hl4DG4Lce3FPE7AtbBSdsbNqpoJLgYkRnNeUV+xwJDHTnUEkxHGbhBXUs5TjJjew/KPy94g+NRaIVRYmMXwAAAABJRU5ErkJggg==)}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-in{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABc0lEQVQ4T71U21ECQRDsJgGdvQDECMQIxAjECMQILCPwzAAjECIQI0AiEDPQAPaWCBhrcKHuCUcV5f7dY3v6tUscefHIePhfwBBCF8CZqRCReRs1tQxDCH1VfQLQz4EsSY4AvIjIsgm8AhhCGKrqa9zwrqoLAKckB5HtguR1E2gBMITQU9VPAD8GICIGtl3e+xHJBwBT59xtHcsCYJZlUwA3kcGHbfDep51OZywi3/acZZm9vyJ5WR5o38uACmDunNt6ZwAkUxFZDwghDFT1jeSjiJinhVUBVNVJkiTDKO8CQA+AsbNQ7s1Ps0VVn5MkSfcCtmBoDZi1Bdx4eJ7zbBolrwPy3o9J3rWSHPs3A1BbjVKlYBaIyDgvu9LDXDU2RTZmXVW1oKyLxRD+OrkOrJLy5mVM0iaftDhuhVbsvBzMglzKUNW6IV/OOWtCM8MmVvEkmbwt83LaB19fdgOtVquUZJeknaDdobTwbOcvBzPcN/AXH1DFFWP7u9oAAAAASUVORK5CYII=)}.ol-ctx-menu-zoom-out{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABU0lEQVQ4T72U7VECMRRFz3sNaAdkacC1AtcKxApcKnCsQOwAK3CtQKxAqEBsANYOqCDPyTIC+8WCw5jfybn33dxEOPGSE/P4b6BzQG89RT47ZJoWhy5B5BGRZAMxWyEyxvtnyFdt8AagS1F9KQ6YvSMyB84xGyDSw2yO2XUbtAJ0MaqfmH0XAPIA2y7tj4F7jAm2uG1yWQZKNEHkBu+Dg2njWBJNEbnC+8uaIFRuWfuG2QxbbrOrUd0A1Tc8D7AIjkur7DAAsVf8MiWMZ3ZR2m02LPIMscATfjHqBnY7TFD9OAy4zTCCPG/MUKMM5O6wkXFr9dZq7FQqqHk/hDzbFa73cFONTZFDdRyiCcKg5rrSiLaXkiI6RjjrfG6VzDs+B5eAxuDXeYpmNRGzL2wZ/wof+du4GNFpBVqqz5HA4MM5VEYYDrOs+1I6Q9u/4Q8O9wN/AGgWjBVqQjjgAAAAAElFTkSuQmCC)}.ol-ctx-menu-container li:hover.ol-ctx-menu-zoom-out{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABYklEQVQ4T72U4VHCQBCF36tA91KAWIFYgViBWIFYgWMFYgdYgVCBWAFSgdiBFpAsFWSdxcDkQoBkhnF/ZjbfvX377ogjF4/Mw/8CVbUD4MynEJF5k2lqFapqz8yeAPRKkCXJEYAXEVnugm8BVXVgZq/FD+9mtgBwSrJfqF2QvN4FjYCq2jWzTwA/DhARh20qTdMRyQcA0xDCbZ3KCJhl2RTATaHgo+6HLMv8+xXJy+qB3l8FGoB5CKHsXcRV1b6ZvZF8FBH3NKotoJlNkiQZFONdlLtJ3rufbouZPSdJMjwIbKDQEzBrClx7eC4i33Uepmk6JnnXaOQifzMAtdGoRApugYiMI1uqKkrRWAfZo9MxM1+UZzFewl8mN4nYdVM83L7BkwbXLUrF3sfBLQDQBbDy08x8vOohXyEE71lVq9emuEk+3gZa3XYroCvwFyjP8yHJDsnxwaU08GxvS2uFhw78BbzWrxXgMbsHAAAAAElFTkSuQmCC)}
|
package/dist/ol-contextmenu.js
CHANGED
|
@@ -1,232 +1,191 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
|
-
* ol-contextmenu - v5.1.
|
|
3
|
+
* ol-contextmenu - v5.1.4
|
|
4
4
|
* https://github.com/jonataswalker/ol-contextmenu
|
|
5
|
-
* Built: Mon Dec 26 2022
|
|
5
|
+
* Built: Mon Dec 26 2022 21:16:02 GMT-0300 (Brasilia Standard Time)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
this.defaultPrevented = !0;
|
|
18
|
-
}
|
|
19
|
-
stopPropagation() {
|
|
20
|
-
this.propagationStopped = !0;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const T = k;
|
|
24
|
-
class O extends T {
|
|
25
|
-
constructor(e, t, n) {
|
|
26
|
-
super(e), this.map = t, this.frameState = n !== void 0 ? n : null;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const I = O;
|
|
30
|
-
class z extends I {
|
|
31
|
-
constructor(e, t, n, s, o, a) {
|
|
32
|
-
super(e, t, o), this.originalEvent = n, this.pixel_ = null, this.coordinate_ = null, this.dragging = s !== void 0 ? s : !1, this.activePointers = a;
|
|
33
|
-
}
|
|
34
|
-
get pixel() {
|
|
35
|
-
return this.pixel_ || (this.pixel_ = this.map.getEventPixel(this.originalEvent)), this.pixel_;
|
|
36
|
-
}
|
|
37
|
-
set pixel(e) {
|
|
38
|
-
this.pixel_ = e;
|
|
39
|
-
}
|
|
40
|
-
get coordinate() {
|
|
41
|
-
return this.coordinate_ || (this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel)), this.coordinate_;
|
|
42
|
-
}
|
|
43
|
-
set coordinate(e) {
|
|
44
|
-
this.coordinate_ = e;
|
|
45
|
-
}
|
|
46
|
-
preventDefault() {
|
|
47
|
-
super.preventDefault(), "preventDefault" in this.originalEvent && this.originalEvent.preventDefault();
|
|
48
|
-
}
|
|
49
|
-
stopPropagation() {
|
|
50
|
-
super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
const H = z;
|
|
54
|
-
var M = /* @__PURE__ */ ((i) => (i.CONTEXTMENU = "contextmenu", i.CLICK = "click", i.DBLCLICK = "dblclick", i))(M || {}), u = /* @__PURE__ */ ((i) => (i.BEFOREOPEN = "beforeopen", i.OPEN = "open", i.CLOSE = "close", i.ADD_MENU_ENTRY = "add-menu-entry", i))(u || {});
|
|
55
|
-
class L extends H {
|
|
56
|
-
constructor(e) {
|
|
57
|
-
super(e.type, e.map, e.originalEvent);
|
|
8
|
+
var k = Object.defineProperty;
|
|
9
|
+
var T = (s, n, e) => n in s ? k(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e;
|
|
10
|
+
var l = (s, n, e) => (T(s, typeof n != "symbol" ? n + "" : n, e), e);
|
|
11
|
+
import O from "ol/control/Control";
|
|
12
|
+
import D from "ol/MapBrowserEvent";
|
|
13
|
+
var b = /* @__PURE__ */ ((s) => (s.CONTEXTMENU = "contextmenu", s.CLICK = "click", s.DBLCLICK = "dblclick", s))(b || {}), p = /* @__PURE__ */ ((s) => (s.BEFOREOPEN = "beforeopen", s.OPEN = "open", s.CLOSE = "close", s.ADD_MENU_ENTRY = "add-menu-entry", s))(p || {});
|
|
14
|
+
class L extends D {
|
|
15
|
+
constructor(n) {
|
|
16
|
+
super(n.type, n.map, n.originalEvent);
|
|
58
17
|
}
|
|
59
18
|
}
|
|
60
|
-
const
|
|
19
|
+
const _ = {
|
|
61
20
|
width: 150,
|
|
62
21
|
scrollAt: 4,
|
|
63
|
-
eventType:
|
|
22
|
+
eventType: b.CONTEXTMENU,
|
|
64
23
|
defaultItems: !0,
|
|
65
24
|
items: []
|
|
66
|
-
},
|
|
67
|
-
namespace:
|
|
68
|
-
container: `${
|
|
69
|
-
separator: `${
|
|
70
|
-
submenu: `${
|
|
71
|
-
hidden: `${
|
|
72
|
-
icon: `${
|
|
73
|
-
zoomIn: `${
|
|
74
|
-
zoomOut: `${
|
|
25
|
+
}, u = "ol-ctx-menu", r = {
|
|
26
|
+
namespace: u,
|
|
27
|
+
container: `${u}-container`,
|
|
28
|
+
separator: `${u}-separator`,
|
|
29
|
+
submenu: `${u}-submenu`,
|
|
30
|
+
hidden: `${u}-hidden`,
|
|
31
|
+
icon: `${u}-icon`,
|
|
32
|
+
zoomIn: `${u}-zoom-in`,
|
|
33
|
+
zoomOut: `${u}-zoom-out`,
|
|
75
34
|
unselectable: "ol-unselectable"
|
|
76
35
|
}, w = [
|
|
77
36
|
{
|
|
78
37
|
text: "Zoom In",
|
|
79
38
|
classname: `${r.zoomIn} ${r.icon}`,
|
|
80
|
-
callback: (
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
zoom: Number(
|
|
39
|
+
callback: (s, n) => {
|
|
40
|
+
const e = n.getView();
|
|
41
|
+
e.animate({
|
|
42
|
+
zoom: Number(e.getZoom()) + 1,
|
|
84
43
|
duration: 700,
|
|
85
|
-
center:
|
|
44
|
+
center: s.coordinate
|
|
86
45
|
});
|
|
87
46
|
}
|
|
88
47
|
},
|
|
89
48
|
{
|
|
90
49
|
text: "Zoom Out",
|
|
91
50
|
classname: `${r.zoomOut} ${r.icon}`,
|
|
92
|
-
callback: (
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
zoom: Number(
|
|
51
|
+
callback: (s, n) => {
|
|
52
|
+
const e = n.getView();
|
|
53
|
+
e.animate({
|
|
54
|
+
zoom: Number(e.getZoom()) - 1,
|
|
96
55
|
duration: 700,
|
|
97
|
-
center:
|
|
56
|
+
center: s.coordinate
|
|
98
57
|
});
|
|
99
58
|
}
|
|
100
59
|
}
|
|
101
60
|
];
|
|
102
|
-
var
|
|
61
|
+
var v = {}, I = {
|
|
103
62
|
get exports() {
|
|
104
|
-
return
|
|
63
|
+
return v;
|
|
105
64
|
},
|
|
106
|
-
set exports(
|
|
107
|
-
|
|
65
|
+
set exports(s) {
|
|
66
|
+
v = s;
|
|
108
67
|
}
|
|
109
68
|
};
|
|
110
|
-
function
|
|
69
|
+
function x() {
|
|
111
70
|
}
|
|
112
|
-
|
|
113
|
-
on: function(
|
|
114
|
-
var
|
|
115
|
-
return (
|
|
116
|
-
fn:
|
|
117
|
-
ctx:
|
|
71
|
+
x.prototype = {
|
|
72
|
+
on: function(s, n, e) {
|
|
73
|
+
var t = this.e || (this.e = {});
|
|
74
|
+
return (t[s] || (t[s] = [])).push({
|
|
75
|
+
fn: n,
|
|
76
|
+
ctx: e
|
|
118
77
|
}), this;
|
|
119
78
|
},
|
|
120
|
-
once: function(
|
|
121
|
-
var
|
|
122
|
-
function
|
|
123
|
-
|
|
79
|
+
once: function(s, n, e) {
|
|
80
|
+
var t = this;
|
|
81
|
+
function i() {
|
|
82
|
+
t.off(s, i), n.apply(e, arguments);
|
|
124
83
|
}
|
|
125
|
-
return
|
|
84
|
+
return i._ = n, this.on(s, i, e);
|
|
126
85
|
},
|
|
127
|
-
emit: function(
|
|
128
|
-
var
|
|
129
|
-
for (
|
|
130
|
-
t
|
|
86
|
+
emit: function(s) {
|
|
87
|
+
var n = [].slice.call(arguments, 1), e = ((this.e || (this.e = {}))[s] || []).slice(), t = 0, i = e.length;
|
|
88
|
+
for (t; t < i; t++)
|
|
89
|
+
e[t].fn.apply(e[t].ctx, n);
|
|
131
90
|
return this;
|
|
132
91
|
},
|
|
133
|
-
off: function(
|
|
134
|
-
var
|
|
135
|
-
if (
|
|
136
|
-
for (var o = 0,
|
|
137
|
-
|
|
138
|
-
return
|
|
92
|
+
off: function(s, n) {
|
|
93
|
+
var e = this.e || (this.e = {}), t = e[s], i = [];
|
|
94
|
+
if (t && n)
|
|
95
|
+
for (var o = 0, c = t.length; o < c; o++)
|
|
96
|
+
t[o].fn !== n && t[o].fn._ !== n && i.push(t[o]);
|
|
97
|
+
return i.length ? e[s] = i : delete e[s], this;
|
|
139
98
|
}
|
|
140
99
|
};
|
|
141
|
-
|
|
142
|
-
var
|
|
143
|
-
const E = new
|
|
144
|
-
function g(
|
|
145
|
-
const
|
|
146
|
-
for (
|
|
147
|
-
|
|
148
|
-
return
|
|
100
|
+
I.exports = x;
|
|
101
|
+
var z = v.TinyEmitter = x;
|
|
102
|
+
const E = new z();
|
|
103
|
+
function g(s) {
|
|
104
|
+
const n = document.createDocumentFragment(), e = document.createElement("div");
|
|
105
|
+
for (e.innerHTML = s; e.firstChild; )
|
|
106
|
+
n.append(e.firstChild);
|
|
107
|
+
return n;
|
|
149
108
|
}
|
|
150
|
-
function
|
|
151
|
-
var d,
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
o.append(
|
|
156
|
-
const m =
|
|
157
|
-
return (
|
|
109
|
+
function P(s) {
|
|
110
|
+
var d, a;
|
|
111
|
+
const n = document.importNode(s), e = s.offsetWidth;
|
|
112
|
+
n.style.cssText = `position: fixed; top: 0; left: 0; overflow: auto; visibility: hidden; pointer-events: none; height: unset; max-height: unset; width: ${e}px`;
|
|
113
|
+
const t = g("<span>Foo</span>"), i = g("<span>Foo</span>"), o = document.createElement("li"), c = document.createElement("li");
|
|
114
|
+
o.append(t), c.append(i), n.append(o), n.append(c), (d = s.parentNode) == null || d.append(n);
|
|
115
|
+
const m = n.offsetHeight / 2;
|
|
116
|
+
return (a = s.parentNode) == null || a.removeChild(n), m;
|
|
158
117
|
}
|
|
159
|
-
function C(
|
|
160
|
-
const
|
|
161
|
-
if (typeof
|
|
162
|
-
const m = `<span>${
|
|
163
|
-
return
|
|
164
|
-
|
|
118
|
+
function C(s, n, e = !1) {
|
|
119
|
+
const t = `_${Math.random().toString(36).slice(2, 11)}`;
|
|
120
|
+
if (typeof n != "string" && "text" in n) {
|
|
121
|
+
const m = `<span>${n.text}</span>`, d = g(m), a = document.createElement("li");
|
|
122
|
+
return n.classname = n.classname || "", n.icon && (n.classname === "" ? n.classname = r.icon : n.classname.includes(r.icon) === !1 && (n.classname += ` ${r.icon}`), a.setAttribute("style", `background-image:url(${n.icon})`)), a.id = t, a.className = n.classname, a.append(d), s.append(a), E.emit(
|
|
123
|
+
p.ADD_MENU_ENTRY,
|
|
165
124
|
{
|
|
166
|
-
id:
|
|
167
|
-
isSubmenu:
|
|
125
|
+
id: t,
|
|
126
|
+
isSubmenu: e,
|
|
168
127
|
isSeparator: !1,
|
|
169
|
-
callback: "callback" in
|
|
170
|
-
data: "data" in
|
|
128
|
+
callback: "callback" in n ? n.callback : null,
|
|
129
|
+
data: "data" in n ? n.data : null
|
|
171
130
|
},
|
|
172
|
-
|
|
173
|
-
),
|
|
131
|
+
a
|
|
132
|
+
), a;
|
|
174
133
|
}
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
const
|
|
134
|
+
const i = `<li id="${t}" class="${r.separator}"><hr></li>`, o = g(i);
|
|
135
|
+
s.append(o);
|
|
136
|
+
const c = s.lastChild;
|
|
178
137
|
return E.emit(
|
|
179
|
-
|
|
138
|
+
p.ADD_MENU_ENTRY,
|
|
180
139
|
{
|
|
181
|
-
id:
|
|
182
|
-
isSubmenu:
|
|
140
|
+
id: t,
|
|
141
|
+
isSubmenu: e,
|
|
183
142
|
isSeparator: !0,
|
|
184
143
|
callback: null,
|
|
185
144
|
data: null
|
|
186
145
|
},
|
|
187
|
-
|
|
188
|
-
),
|
|
146
|
+
c
|
|
147
|
+
), c;
|
|
189
148
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
192
|
-
if (typeof
|
|
193
|
-
const
|
|
194
|
-
|
|
149
|
+
function M(s, n, e) {
|
|
150
|
+
n.forEach((t) => {
|
|
151
|
+
if (typeof t != "string" && "items" in t && Array.isArray(t.items)) {
|
|
152
|
+
const i = C(s, t, !0);
|
|
153
|
+
i.classList.add(r.submenu);
|
|
195
154
|
const o = document.createElement("ul");
|
|
196
|
-
o.classList.add(r.container), o.style.width = `${
|
|
155
|
+
o.classList.add(r.container), o.style.width = `${e}px`, i.append(o), M(o, t.items, e);
|
|
197
156
|
} else
|
|
198
|
-
C(
|
|
157
|
+
C(s, t);
|
|
199
158
|
});
|
|
200
159
|
}
|
|
201
|
-
function
|
|
202
|
-
if (!
|
|
203
|
-
throw new Error(
|
|
160
|
+
function y(s, n) {
|
|
161
|
+
if (!s)
|
|
162
|
+
throw new Error(n);
|
|
204
163
|
}
|
|
205
|
-
class
|
|
206
|
-
constructor(
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
super({ element:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
this.options = { ...
|
|
224
|
-
const
|
|
225
|
-
|
|
164
|
+
class B extends O {
|
|
165
|
+
constructor(e = {}) {
|
|
166
|
+
y(typeof e == "object", "@param `opts` should be object type!");
|
|
167
|
+
const t = document.createElement("div");
|
|
168
|
+
super({ element: t });
|
|
169
|
+
l(this, "map");
|
|
170
|
+
l(this, "container");
|
|
171
|
+
l(this, "coordinate", []);
|
|
172
|
+
l(this, "pixel", []);
|
|
173
|
+
l(this, "contextMenuEventListener");
|
|
174
|
+
l(this, "entryCallbackEventListener");
|
|
175
|
+
l(this, "mapMoveListener");
|
|
176
|
+
l(this, "lineHeight", 0);
|
|
177
|
+
l(this, "disabled");
|
|
178
|
+
l(this, "opened");
|
|
179
|
+
l(this, "items", []);
|
|
180
|
+
l(this, "menuEntries", /* @__PURE__ */ new Map());
|
|
181
|
+
l(this, "options");
|
|
182
|
+
this.options = { ..._, ...e };
|
|
183
|
+
const i = document.createElement("ul");
|
|
184
|
+
t.append(i), t.style.width = `${this.options.width}px`, t.classList.add(
|
|
226
185
|
r.container,
|
|
227
186
|
r.unselectable,
|
|
228
187
|
r.hidden
|
|
229
|
-
), this.container =
|
|
188
|
+
), this.container = t, this.contextMenuEventListener = (o) => {
|
|
230
189
|
this.handleContextMenu(o);
|
|
231
190
|
}, this.entryCallbackEventListener = (o) => {
|
|
232
191
|
this.handleEntryCallback(o);
|
|
@@ -235,8 +194,8 @@ class j extends P {
|
|
|
235
194
|
}, this.disabled = !1, this.opened = !1;
|
|
236
195
|
}
|
|
237
196
|
clear() {
|
|
238
|
-
for (const
|
|
239
|
-
this.removeMenuEntry(
|
|
197
|
+
for (const e of this.menuEntries.keys())
|
|
198
|
+
this.removeMenuEntry(e);
|
|
240
199
|
this.container.replaceChildren(), this.container.append(document.createElement("ul"));
|
|
241
200
|
}
|
|
242
201
|
enable() {
|
|
@@ -251,136 +210,136 @@ class j extends P {
|
|
|
251
210
|
countItems() {
|
|
252
211
|
return this.menuEntries.size;
|
|
253
212
|
}
|
|
254
|
-
extend(
|
|
255
|
-
|
|
213
|
+
extend(e) {
|
|
214
|
+
y(Array.isArray(e), "@param `items` should be an Array."), M(
|
|
256
215
|
this.container.firstElementChild,
|
|
257
|
-
|
|
216
|
+
e,
|
|
258
217
|
this.options.width
|
|
259
218
|
);
|
|
260
219
|
}
|
|
261
220
|
closeMenu() {
|
|
262
|
-
this.opened = !1, this.container.classList.add(r.hidden), this.dispatchEvent(
|
|
221
|
+
this.opened = !1, this.container.classList.add(r.hidden), this.dispatchEvent(p.CLOSE);
|
|
263
222
|
}
|
|
264
223
|
isOpen() {
|
|
265
224
|
return this.opened;
|
|
266
225
|
}
|
|
267
|
-
updatePosition(
|
|
268
|
-
|
|
226
|
+
updatePosition(e) {
|
|
227
|
+
y(Array.isArray(e), "@param `pixel` should be an Array."), this.isOpen() && (this.pixel = e, this.positionContainer());
|
|
269
228
|
}
|
|
270
229
|
pop() {
|
|
271
|
-
const
|
|
272
|
-
|
|
230
|
+
const e = Array.from(this.menuEntries.keys()).pop();
|
|
231
|
+
e && this.removeMenuEntry(e);
|
|
273
232
|
}
|
|
274
233
|
shift() {
|
|
275
|
-
const
|
|
276
|
-
|
|
234
|
+
const e = Array.from(this.menuEntries.keys()).shift();
|
|
235
|
+
e && this.removeMenuEntry(e);
|
|
277
236
|
}
|
|
278
|
-
push(
|
|
279
|
-
|
|
237
|
+
push(e) {
|
|
238
|
+
e && this.extend([e]);
|
|
280
239
|
}
|
|
281
|
-
setMap(
|
|
282
|
-
if (super.setMap(
|
|
283
|
-
this.map =
|
|
240
|
+
setMap(e) {
|
|
241
|
+
if (super.setMap(e), e) {
|
|
242
|
+
this.map = e, this.map.getViewport().addEventListener(this.options.eventType, this.contextMenuEventListener, !1), this.map.on("movestart", () => {
|
|
284
243
|
this.handleMapMove();
|
|
285
244
|
}), E.on(
|
|
286
|
-
|
|
287
|
-
(
|
|
288
|
-
this.handleAddMenuEntry(
|
|
245
|
+
p.ADD_MENU_ENTRY,
|
|
246
|
+
(i, o) => {
|
|
247
|
+
this.handleAddMenuEntry(i, o);
|
|
289
248
|
},
|
|
290
249
|
this
|
|
291
|
-
), this.items = this.options.defaultItems ? this.options.items.concat(w) : this.options.items,
|
|
250
|
+
), this.items = this.options.defaultItems ? this.options.items.concat(w) : this.options.items, M(
|
|
292
251
|
this.container.firstElementChild,
|
|
293
252
|
this.items,
|
|
294
253
|
this.options.width
|
|
295
254
|
);
|
|
296
|
-
const
|
|
297
|
-
this.lineHeight =
|
|
255
|
+
const t = this.getMenuEntriesLength();
|
|
256
|
+
this.lineHeight = t > 0 ? this.container.offsetHeight / t : P(this.container);
|
|
298
257
|
} else
|
|
299
258
|
this.removeListeners(), this.clear();
|
|
300
259
|
}
|
|
301
260
|
removeListeners() {
|
|
302
|
-
this.map.getViewport().removeEventListener(this.options.eventType, this.contextMenuEventListener, !1), E.off(
|
|
261
|
+
this.map.getViewport().removeEventListener(this.options.eventType, this.contextMenuEventListener, !1), E.off(p.ADD_MENU_ENTRY);
|
|
303
262
|
}
|
|
304
|
-
removeMenuEntry(
|
|
305
|
-
const
|
|
306
|
-
|
|
263
|
+
removeMenuEntry(e) {
|
|
264
|
+
const t = document.getElementById(e);
|
|
265
|
+
t == null || t.remove(), t == null || t.removeEventListener("click", this.entryCallbackEventListener), this.menuEntries.delete(e);
|
|
307
266
|
}
|
|
308
|
-
handleContextMenu(
|
|
309
|
-
var
|
|
310
|
-
this.coordinate = this.map.getEventCoordinate(
|
|
267
|
+
handleContextMenu(e) {
|
|
268
|
+
var t;
|
|
269
|
+
this.coordinate = this.map.getEventCoordinate(e), this.pixel = this.map.getEventPixel(e), this.dispatchEvent(
|
|
311
270
|
new L({
|
|
312
|
-
type:
|
|
271
|
+
type: p.BEFOREOPEN,
|
|
313
272
|
map: this.map,
|
|
314
|
-
originalEvent:
|
|
273
|
+
originalEvent: e
|
|
315
274
|
})
|
|
316
|
-
), !this.disabled && (this.options.eventType ===
|
|
317
|
-
this.openMenu(
|
|
318
|
-
}), (
|
|
275
|
+
), !this.disabled && (this.options.eventType === b.CONTEXTMENU && (e.stopPropagation(), e.preventDefault()), setTimeout(() => {
|
|
276
|
+
this.openMenu(e);
|
|
277
|
+
}), (t = e.target) == null || t.addEventListener(
|
|
319
278
|
"pointerdown",
|
|
320
|
-
(
|
|
321
|
-
this.opened && (
|
|
279
|
+
(i) => {
|
|
280
|
+
this.opened && (i.stopPropagation(), this.closeMenu());
|
|
322
281
|
},
|
|
323
282
|
{ once: !0 }
|
|
324
283
|
));
|
|
325
284
|
}
|
|
326
|
-
openMenu(
|
|
285
|
+
openMenu(e) {
|
|
327
286
|
this.menuEntries.size !== 0 && (this.opened = !0, this.positionContainer(), this.container.classList.remove(r.hidden), this.dispatchEvent(
|
|
328
287
|
new L({
|
|
329
|
-
type:
|
|
288
|
+
type: p.OPEN,
|
|
330
289
|
map: this.map,
|
|
331
|
-
originalEvent:
|
|
290
|
+
originalEvent: e
|
|
332
291
|
})
|
|
333
292
|
));
|
|
334
293
|
}
|
|
335
294
|
getMenuEntriesLength() {
|
|
336
295
|
return Array.from(this.menuEntries).filter(
|
|
337
|
-
([,
|
|
296
|
+
([, e]) => e.isSeparator === !1 || e.isSubmenu === !1
|
|
338
297
|
).length;
|
|
339
298
|
}
|
|
340
299
|
positionContainer() {
|
|
341
|
-
const
|
|
342
|
-
w:
|
|
343
|
-
h:
|
|
344
|
-
},
|
|
300
|
+
const e = this.map.getSize() || [0, 0], t = {
|
|
301
|
+
w: e[0] - this.pixel[0],
|
|
302
|
+
h: e[1] - this.pixel[1]
|
|
303
|
+
}, i = {
|
|
345
304
|
w: this.container.offsetWidth,
|
|
346
305
|
h: Math.round(this.lineHeight * this.getMenuEntriesLength())
|
|
347
|
-
}, o =
|
|
348
|
-
this.container.style.left = `${o}px`, this.container.style.top =
|
|
349
|
-
const
|
|
306
|
+
}, o = t.w >= i.w ? this.pixel[0] + 5 : this.pixel[0] - i.w;
|
|
307
|
+
this.container.style.left = `${o}px`, this.container.style.top = t.h >= i.h ? `${this.pixel[1] - 10}px` : `${this.pixel[1] - i.h}px`, this.container.style.right = "auto", this.container.style.bottom = "auto", t.w -= i.w;
|
|
308
|
+
const c = (a) => Array.from(a.children).filter(
|
|
350
309
|
(f) => f.tagName === "LI" && f.classList.contains(r.submenu)
|
|
351
310
|
);
|
|
352
311
|
let m = 0;
|
|
353
|
-
const d = (
|
|
354
|
-
m += 1, a
|
|
355
|
-
const N = f >=
|
|
312
|
+
const d = (a, f) => {
|
|
313
|
+
m += 1, c(a).forEach((A) => {
|
|
314
|
+
const N = f >= i.w ? i.w - 8 : (i.w + 8) * -1, h = A.querySelector(
|
|
356
315
|
`ul.${r.container}`
|
|
357
316
|
), $ = Math.round(
|
|
358
|
-
this.lineHeight * Array.from(h.children).filter((
|
|
317
|
+
this.lineHeight * Array.from(h.children).filter((S) => S.tagName === "LI").length
|
|
359
318
|
);
|
|
360
|
-
h.style.left = `${N}px`, h.style.right = "auto", h.style.top =
|
|
319
|
+
h.style.left = `${N}px`, h.style.right = "auto", h.style.top = t.h >= $ + i.h ? "0" : `-${h.offsetHeight - 25}px`, h.style.bottom = "auto", h.style.zIndex = String(m), c(h).length > 0 && d(h, f - i.w);
|
|
361
320
|
});
|
|
362
321
|
};
|
|
363
|
-
d(this.container.firstElementChild,
|
|
322
|
+
d(this.container.firstElementChild, t.w);
|
|
364
323
|
}
|
|
365
324
|
handleMapMove() {
|
|
366
325
|
this.closeMenu();
|
|
367
326
|
}
|
|
368
|
-
handleEntryCallback(
|
|
369
|
-
var
|
|
370
|
-
|
|
371
|
-
const
|
|
372
|
-
if (!
|
|
327
|
+
handleEntryCallback(e) {
|
|
328
|
+
var c;
|
|
329
|
+
e.preventDefault(), e.stopPropagation();
|
|
330
|
+
const t = e.currentTarget, i = this.menuEntries.get(t.id);
|
|
331
|
+
if (!i)
|
|
373
332
|
return;
|
|
374
333
|
const o = {
|
|
375
334
|
coordinate: this.coordinate,
|
|
376
|
-
data:
|
|
335
|
+
data: i.data
|
|
377
336
|
};
|
|
378
|
-
this.closeMenu(), (
|
|
337
|
+
this.closeMenu(), (c = i.callback) == null || c.call(i, o, this.map);
|
|
379
338
|
}
|
|
380
|
-
handleAddMenuEntry(
|
|
381
|
-
this.menuEntries.set(
|
|
339
|
+
handleAddMenuEntry(e, t) {
|
|
340
|
+
this.menuEntries.set(e.id, e), this.positionContainer(), "callback" in e && typeof e.callback == "function" && t.addEventListener("click", this.entryCallbackEventListener, !1);
|
|
382
341
|
}
|
|
383
342
|
}
|
|
384
343
|
export {
|
|
385
|
-
|
|
344
|
+
B as default
|
|
386
345
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
/*!
|
|
3
|
-
* ol-contextmenu - v5.1.
|
|
3
|
+
* ol-contextmenu - v5.1.4
|
|
4
4
|
* https://github.com/jonataswalker/ol-contextmenu
|
|
5
|
-
* Built: Mon Dec 26 2022
|
|
5
|
+
* Built: Mon Dec 26 2022 21:16:02 GMT-0300 (Brasilia Standard Time)
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
(function(
|
|
8
|
+
(function(c,h){typeof exports=="object"&&typeof module<"u"?module.exports=h(require("ol/control/Control"),require("ol/MapBrowserEvent")):typeof define=="function"&&define.amd?define(["ol/control/Control","ol/MapBrowserEvent"],h):(c=typeof globalThis<"u"?globalThis:c||self,c.ContextMenu=h(c.ol.control.Control,c.ol.MapBrowserEvent))})(this,function(c,h){"use strict";var P=Object.defineProperty;var H=(c,h,d)=>h in c?P(c,h,{enumerable:!0,configurable:!0,writable:!0,value:d}):c[h]=d;var l=(c,h,d)=>(H(c,typeof h!="symbol"?h+"":h,d),d);var d=(s=>(s.CONTEXTMENU="contextmenu",s.CLICK="click",s.DBLCLICK="dblclick",s))(d||{}),m=(s=>(s.BEFOREOPEN="beforeopen",s.OPEN="open",s.CLOSE="close",s.ADD_MENU_ENTRY="add-menu-entry",s))(m||{});class C extends h{constructor(n){super(n.type,n.map,n.originalEvent)}}const $={width:150,scrollAt:4,eventType:d.CONTEXTMENU,defaultItems:!0,items:[]},f="ol-ctx-menu",r={namespace:f,container:`${f}-container`,separator:`${f}-separator`,submenu:`${f}-submenu`,hidden:`${f}-hidden`,icon:`${f}-icon`,zoomIn:`${f}-zoom-in`,zoomOut:`${f}-zoom-out`,unselectable:"ol-unselectable"},A=[{text:"Zoom In",classname:`${r.zoomIn} ${r.icon}`,callback:(s,n)=>{const e=n.getView();e.animate({zoom:Number(e.getZoom())+1,duration:700,center:s.coordinate})}},{text:"Zoom Out",classname:`${r.zoomOut} ${r.icon}`,callback:(s,n)=>{const e=n.getView();e.animate({zoom:Number(e.getZoom())-1,duration:700,center:s.coordinate})}}];var x={},S={get exports(){return x},set exports(s){x=s}};function b(){}b.prototype={on:function(s,n,e){var t=this.e||(this.e={});return(t[s]||(t[s]=[])).push({fn:n,ctx:e}),this},once:function(s,n,e){var t=this;function i(){t.off(s,i),n.apply(e,arguments)}return i._=n,this.on(s,i,e)},emit:function(s){var n=[].slice.call(arguments,1),e=((this.e||(this.e={}))[s]||[]).slice(),t=0,i=e.length;for(t;t<i;t++)e[t].fn.apply(e[t].ctx,n);return this},off:function(s,n){var e=this.e||(this.e={}),t=e[s],i=[];if(t&&n)for(var o=0,u=t.length;o<u;o++)t[o].fn!==n&&t[o].fn._!==n&&i.push(t[o]);return i.length?e[s]=i:delete e[s],this}},S.exports=b;var T=x.TinyEmitter=b;const v=new T;function M(s){const n=document.createDocumentFragment(),e=document.createElement("div");for(e.innerHTML=s;e.firstChild;)n.append(e.firstChild);return n}function k(s){var E,a;const n=document.importNode(s),e=s.offsetWidth;n.style.cssText=`position: fixed; top: 0; left: 0; overflow: auto; visibility: hidden; pointer-events: none; height: unset; max-height: unset; width: ${e}px`;const t=M("<span>Foo</span>"),i=M("<span>Foo</span>"),o=document.createElement("li"),u=document.createElement("li");o.append(t),u.append(i),n.append(o),n.append(u),(E=s.parentNode)==null||E.append(n);const g=n.offsetHeight/2;return(a=s.parentNode)==null||a.removeChild(n),g}function N(s,n,e=!1){const t=`_${Math.random().toString(36).slice(2,11)}`;if(typeof n!="string"&&"text"in n){const g=`<span>${n.text}</span>`,E=M(g),a=document.createElement("li");return n.classname=n.classname||"",n.icon&&(n.classname===""?n.classname=r.icon:n.classname.includes(r.icon)===!1&&(n.classname+=` ${r.icon}`),a.setAttribute("style",`background-image:url(${n.icon})`)),a.id=t,a.className=n.classname,a.append(E),s.append(a),v.emit(m.ADD_MENU_ENTRY,{id:t,isSubmenu:e,isSeparator:!1,callback:"callback"in n?n.callback:null,data:"data"in n?n.data:null},a),a}const i=`<li id="${t}" class="${r.separator}"><hr></li>`,o=M(i);s.append(o);const u=s.lastChild;return v.emit(m.ADD_MENU_ENTRY,{id:t,isSubmenu:e,isSeparator:!0,callback:null,data:null},u),u}function L(s,n,e){n.forEach(t=>{if(typeof t!="string"&&"items"in t&&Array.isArray(t.items)){const i=N(s,t,!0);i.classList.add(r.submenu);const o=document.createElement("ul");o.classList.add(r.container),o.style.width=`${e}px`,i.append(o),L(o,t.items,e)}else N(s,t)})}const U="";function w(s,n){if(!s)throw new Error(n)}class O extends c{constructor(e={}){w(typeof e=="object","@param `opts` should be object type!");const t=document.createElement("div");super({element:t});l(this,"map");l(this,"container");l(this,"coordinate",[]);l(this,"pixel",[]);l(this,"contextMenuEventListener");l(this,"entryCallbackEventListener");l(this,"mapMoveListener");l(this,"lineHeight",0);l(this,"disabled");l(this,"opened");l(this,"items",[]);l(this,"menuEntries",new Map);l(this,"options");this.options={...$,...e};const i=document.createElement("ul");t.append(i),t.style.width=`${this.options.width}px`,t.classList.add(r.container,r.unselectable,r.hidden),this.container=t,this.contextMenuEventListener=o=>{this.handleContextMenu(o)},this.entryCallbackEventListener=o=>{this.handleEntryCallback(o)},this.mapMoveListener=()=>{this.handleMapMove()},this.disabled=!1,this.opened=!1}clear(){for(const e of this.menuEntries.keys())this.removeMenuEntry(e);this.container.replaceChildren(),this.container.append(document.createElement("ul"))}enable(){this.disabled=!1}disable(){this.disabled=!0}getDefaultItems(){return A}countItems(){return this.menuEntries.size}extend(e){w(Array.isArray(e),"@param `items` should be an Array."),L(this.container.firstElementChild,e,this.options.width)}closeMenu(){this.opened=!1,this.container.classList.add(r.hidden),this.dispatchEvent(m.CLOSE)}isOpen(){return this.opened}updatePosition(e){w(Array.isArray(e),"@param `pixel` should be an Array."),this.isOpen()&&(this.pixel=e,this.positionContainer())}pop(){const e=Array.from(this.menuEntries.keys()).pop();e&&this.removeMenuEntry(e)}shift(){const e=Array.from(this.menuEntries.keys()).shift();e&&this.removeMenuEntry(e)}push(e){e&&this.extend([e])}setMap(e){if(super.setMap(e),e){this.map=e,this.map.getViewport().addEventListener(this.options.eventType,this.contextMenuEventListener,!1),this.map.on("movestart",()=>{this.handleMapMove()}),v.on(m.ADD_MENU_ENTRY,(i,o)=>{this.handleAddMenuEntry(i,o)},this),this.items=this.options.defaultItems?this.options.items.concat(A):this.options.items,L(this.container.firstElementChild,this.items,this.options.width);const t=this.getMenuEntriesLength();this.lineHeight=t>0?this.container.offsetHeight/t:k(this.container)}else this.removeListeners(),this.clear()}removeListeners(){this.map.getViewport().removeEventListener(this.options.eventType,this.contextMenuEventListener,!1),v.off(m.ADD_MENU_ENTRY)}removeMenuEntry(e){const t=document.getElementById(e);t==null||t.remove(),t==null||t.removeEventListener("click",this.entryCallbackEventListener),this.menuEntries.delete(e)}handleContextMenu(e){var t;this.coordinate=this.map.getEventCoordinate(e),this.pixel=this.map.getEventPixel(e),this.dispatchEvent(new C({type:m.BEFOREOPEN,map:this.map,originalEvent:e})),!this.disabled&&(this.options.eventType===d.CONTEXTMENU&&(e.stopPropagation(),e.preventDefault()),setTimeout(()=>{this.openMenu(e)}),(t=e.target)==null||t.addEventListener("pointerdown",i=>{this.opened&&(i.stopPropagation(),this.closeMenu())},{once:!0}))}openMenu(e){this.menuEntries.size!==0&&(this.opened=!0,this.positionContainer(),this.container.classList.remove(r.hidden),this.dispatchEvent(new C({type:m.OPEN,map:this.map,originalEvent:e})))}getMenuEntriesLength(){return Array.from(this.menuEntries).filter(([,e])=>e.isSeparator===!1||e.isSubmenu===!1).length}positionContainer(){const e=this.map.getSize()||[0,0],t={w:e[0]-this.pixel[0],h:e[1]-this.pixel[1]},i={w:this.container.offsetWidth,h:Math.round(this.lineHeight*this.getMenuEntriesLength())},o=t.w>=i.w?this.pixel[0]+5:this.pixel[0]-i.w;this.container.style.left=`${o}px`,this.container.style.top=t.h>=i.h?`${this.pixel[1]-10}px`:`${this.pixel[1]-i.h}px`,this.container.style.right="auto",this.container.style.bottom="auto",t.w-=i.w;const u=a=>Array.from(a.children).filter(y=>y.tagName==="LI"&&y.classList.contains(r.submenu));let g=0;const E=(a,y)=>{g+=1,u(a).forEach(D=>{const _=y>=i.w?i.w-8:(i.w+8)*-1,p=D.querySelector(`ul.${r.container}`),I=Math.round(this.lineHeight*Array.from(p.children).filter(z=>z.tagName==="LI").length);p.style.left=`${_}px`,p.style.right="auto",p.style.top=t.h>=I+i.h?"0":`-${p.offsetHeight-25}px`,p.style.bottom="auto",p.style.zIndex=String(g),u(p).length>0&&E(p,y-i.w)})};E(this.container.firstElementChild,t.w)}handleMapMove(){this.closeMenu()}handleEntryCallback(e){var u;e.preventDefault(),e.stopPropagation();const t=e.currentTarget,i=this.menuEntries.get(t.id);if(!i)return;const o={coordinate:this.coordinate,data:i.data};this.closeMenu(),(u=i.callback)==null||u.call(i,o,this.map)}handleAddMenuEntry(e,t){this.menuEntries.set(e.id,e),this.positionContainer(),"callback"in e&&typeof e.callback=="function"&&t.addEventListener("click",this.entryCallbackEventListener,!1)}}return O});
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import OlMap from 'ol/Map';
|
|
1
2
|
import type { Coordinate } from 'ol/coordinate';
|
|
2
|
-
import
|
|
3
|
+
import MapBrowserEvent from 'ol/MapBrowserEvent';
|
|
3
4
|
export declare enum EventTypes {
|
|
4
5
|
CONTEXTMENU = "contextmenu",
|
|
5
6
|
CLICK = "click",
|