@eox/layercontrol 0.6.2 → 0.6.3
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/eox-layercontrol.js +177 -111
- package/dist/eox-layercontrol.umd.cjs +68 -7
- package/package.json +1 -1
- package/test/_mockMap.ts +49 -0
- package/test/general.cy.ts +87 -0
- package/test/changingLayers.cy.ts +0 -44
- package/test/geotiff.cy.ts +0 -72
- package/test/mapIntegration.cy.ts +0 -35
- package/test/mapIntegration.html +0 -47
- package/test/mapIntegration.json +0 -65
- package/test/zIndex.cy.ts +0 -34
package/dist/eox-layercontrol.js
CHANGED
|
@@ -657,7 +657,7 @@ const Ge = (i, t, e) => {
|
|
|
657
657
|
for (let r = t; r <= e; r++)
|
|
658
658
|
n.set(i[r], r);
|
|
659
659
|
return n;
|
|
660
|
-
},
|
|
660
|
+
}, xe = mi(class extends vi {
|
|
661
661
|
constructor(i) {
|
|
662
662
|
if (super(i), i.type !== at.CHILD)
|
|
663
663
|
throw Error("repeat() can only be used in text expressions");
|
|
@@ -723,7 +723,7 @@ const Ge = (i, t, e) => {
|
|
|
723
723
|
* Copyright 2020 Google LLC
|
|
724
724
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
725
725
|
*/
|
|
726
|
-
const
|
|
726
|
+
const Ce = mi(class extends vi {
|
|
727
727
|
constructor(i) {
|
|
728
728
|
if (super(i), i.type !== at.PROPERTY && i.type !== at.ATTRIBUTE && i.type !== at.BOOLEAN_ATTRIBUTE)
|
|
729
729
|
throw Error("The `live` directive is not allowed on child or event bindings");
|
|
@@ -904,7 +904,7 @@ function yt(i, t) {
|
|
|
904
904
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
905
905
|
return r && new r(e);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function xi(i, t, e) {
|
|
908
908
|
if (i) {
|
|
909
909
|
var n = i.getElementsByTagName(t), r = 0, o = n.length;
|
|
910
910
|
if (e)
|
|
@@ -1037,7 +1037,7 @@ function ln(i, t) {
|
|
|
1037
1037
|
function dn(i, t, e) {
|
|
1038
1038
|
i.scrollLeft += t, i.scrollTop += e;
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function Ci(i) {
|
|
1041
1041
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
1042
1042
|
return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
|
|
1043
1043
|
}
|
|
@@ -1176,12 +1176,12 @@ var fn = ["evt"], P = function(t, e) {
|
|
|
1176
1176
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = nn(n, fn);
|
|
1177
1177
|
kt.pluginEvent.bind(y)(t, e, X({
|
|
1178
1178
|
dragEl: h,
|
|
1179
|
-
parentEl:
|
|
1179
|
+
parentEl: $,
|
|
1180
1180
|
ghostEl: b,
|
|
1181
|
-
rootEl:
|
|
1181
|
+
rootEl: x,
|
|
1182
1182
|
nextEl: st,
|
|
1183
1183
|
lastDownEl: Yt,
|
|
1184
|
-
cloneEl:
|
|
1184
|
+
cloneEl: C,
|
|
1185
1185
|
cloneHidden: K,
|
|
1186
1186
|
dragStarted: Tt,
|
|
1187
1187
|
putSortable: T,
|
|
@@ -1211,23 +1211,23 @@ var fn = ["evt"], P = function(t, e) {
|
|
|
1211
1211
|
function I(i) {
|
|
1212
1212
|
pn(X({
|
|
1213
1213
|
putSortable: T,
|
|
1214
|
-
cloneEl:
|
|
1214
|
+
cloneEl: C,
|
|
1215
1215
|
targetEl: h,
|
|
1216
|
-
rootEl:
|
|
1216
|
+
rootEl: x,
|
|
1217
1217
|
oldIndex: mt,
|
|
1218
1218
|
oldDraggableIndex: Ot,
|
|
1219
1219
|
newIndex: k,
|
|
1220
1220
|
newDraggableIndex: q
|
|
1221
1221
|
}, i));
|
|
1222
1222
|
}
|
|
1223
|
-
var h,
|
|
1223
|
+
var h, $, b, x, st, Yt, C, K, mt, k, Ot, q, Bt, T, gt = !1, Qt = !1, te = [], rt, F, ve, ye, ei, ii, Tt, pt, Ht, Lt = !1, Rt = !1, Wt, L, be = [], $e = !1, ee = [], ne = typeof document < "u", Ut = _i, ni = ie || tt ? "cssFloat" : "float", gn = ne && !Ei && !_i && "draggable" in document.createElement("div"), $i = function() {
|
|
1224
1224
|
if (ne) {
|
|
1225
1225
|
if (tt)
|
|
1226
1226
|
return !1;
|
|
1227
1227
|
var i = document.createElement("x");
|
|
1228
1228
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
1229
1229
|
}
|
|
1230
|
-
}(),
|
|
1230
|
+
}(), Ai = function(t, e) {
|
|
1231
1231
|
var n = g(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = _t(t, 0, e), a = _t(t, 1, e), l = o && g(o), s = a && g(a), d = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + D(o).width, p = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + D(a).width;
|
|
1232
1232
|
if (n.display === "flex")
|
|
1233
1233
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
@@ -1272,9 +1272,9 @@ var h, A, b, C, st, Yt, $, K, mt, k, Ot, q, Bt, T, gt = !1, Qt = !1, te = [], rt
|
|
|
1272
1272
|
name: r
|
|
1273
1273
|
}), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
|
|
1274
1274
|
}, Di = function() {
|
|
1275
|
-
|
|
1275
|
+
!$i && b && g(b, "display", "none");
|
|
1276
1276
|
}, Ti = function() {
|
|
1277
|
-
|
|
1277
|
+
!$i && b && g(b, "display", "");
|
|
1278
1278
|
};
|
|
1279
1279
|
ne && !Ei && document.addEventListener("click", function(i) {
|
|
1280
1280
|
if (Qt)
|
|
@@ -1313,7 +1313,7 @@ function y(i, t) {
|
|
|
1313
1313
|
// will be set to same as swapThreshold if default
|
|
1314
1314
|
removeCloneOnHide: !0,
|
|
1315
1315
|
direction: function() {
|
|
1316
|
-
return
|
|
1316
|
+
return Ai(i, this.options);
|
|
1317
1317
|
},
|
|
1318
1318
|
ghostClass: "sortable-ghost",
|
|
1319
1319
|
chosenClass: "sortable-chosen",
|
|
@@ -1363,7 +1363,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1363
1363
|
_onTapStart: function(t) {
|
|
1364
1364
|
if (t.cancelable) {
|
|
1365
1365
|
var e = this, n = this.el, r = this.options, o = r.preventOnFilter, a = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, s = (l || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || s, p = r.filter;
|
|
1366
|
-
if (
|
|
1366
|
+
if (An(n), !h && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Xt && s && s.tagName.toUpperCase() === "SELECT") && (s = j(s, r.draggable, n, !1), !(s && s.animated) && Yt !== s)) {
|
|
1367
1367
|
if (mt = B(s), Ot = B(s, r.draggable), typeof p == "function") {
|
|
1368
1368
|
if (p.call(this, t, s, this)) {
|
|
1369
1369
|
I({
|
|
@@ -1402,7 +1402,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1402
1402
|
var r = this, o = r.el, a = r.options, l = o.ownerDocument, s;
|
|
1403
1403
|
if (n && !h && n.parentNode === o) {
|
|
1404
1404
|
var d = D(n);
|
|
1405
|
-
if (
|
|
1405
|
+
if (x = o, h = n, $ = h.parentNode, st = h.nextSibling, Yt = n, Bt = a.group, y.dragged = h, rt = {
|
|
1406
1406
|
target: h,
|
|
1407
1407
|
clientX: (e || t).clientX,
|
|
1408
1408
|
clientY: (e || t).clientY
|
|
@@ -1419,7 +1419,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1419
1419
|
originalEvent: t
|
|
1420
1420
|
}), N(h, a.chosenClass, !0);
|
|
1421
1421
|
}, a.ignore.split(",").forEach(function(p) {
|
|
1422
|
-
|
|
1422
|
+
xi(h, p.trim(), _e);
|
|
1423
1423
|
}), w(l, "dragover", ot), w(l, "mousemove", ot), w(l, "touchmove", ot), w(l, "mouseup", r._onDrop), w(l, "touchend", r._onDrop), w(l, "touchcancel", r._onDrop), qe && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), P("delayStart", this, {
|
|
1424
1424
|
evt: t
|
|
1425
1425
|
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(ie || tt))) {
|
|
@@ -1444,7 +1444,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1444
1444
|
E(t, "mouseup", this._disableDelayedDrag), E(t, "touchend", this._disableDelayedDrag), E(t, "touchcancel", this._disableDelayedDrag), E(t, "mousemove", this._delayedDragTouchMoveHandler), E(t, "touchmove", this._delayedDragTouchMoveHandler), E(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1445
1445
|
},
|
|
1446
1446
|
_triggerDragStart: function(t, e) {
|
|
1447
|
-
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? w(document, "pointermove", this._onTouchMove) : e ? w(document, "touchmove", this._onTouchMove) : w(document, "mousemove", this._onTouchMove) : (w(h, "dragend", this), w(
|
|
1447
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? w(document, "pointermove", this._onTouchMove) : e ? w(document, "touchmove", this._onTouchMove) : w(document, "mousemove", this._onTouchMove) : (w(h, "dragend", this), w(x, "dragstart", this._onDragStart));
|
|
1448
1448
|
try {
|
|
1449
1449
|
document.selection ? Gt(function() {
|
|
1450
1450
|
document.selection.empty();
|
|
@@ -1453,7 +1453,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1453
1453
|
}
|
|
1454
1454
|
},
|
|
1455
1455
|
_dragStarted: function(t, e) {
|
|
1456
|
-
if (gt = !1,
|
|
1456
|
+
if (gt = !1, x && h) {
|
|
1457
1457
|
P("dragStarted", this, {
|
|
1458
1458
|
evt: e
|
|
1459
1459
|
}), this.nativeDraggable && w(document, "dragover", yn);
|
|
@@ -1513,7 +1513,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1513
1513
|
},
|
|
1514
1514
|
_appendGhost: function() {
|
|
1515
1515
|
if (!b) {
|
|
1516
|
-
var t = this.options.fallbackOnBody ? document.body :
|
|
1516
|
+
var t = this.options.fallbackOnBody ? document.body : x, e = D(h, !0, Ut, !0, t), n = this.options;
|
|
1517
1517
|
if (Ut) {
|
|
1518
1518
|
for (L = t; g(L, "position") === "static" && g(L, "transform") === "none" && L !== document; )
|
|
1519
1519
|
L = L.parentNode;
|
|
@@ -1530,8 +1530,8 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1530
1530
|
this._onDrop();
|
|
1531
1531
|
return;
|
|
1532
1532
|
}
|
|
1533
|
-
P("setupClone", this), y.eventCanceled || (
|
|
1534
|
-
P("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide ||
|
|
1533
|
+
P("setupClone", this), y.eventCanceled || (C = Ci(h), C.removeAttribute("id"), C.draggable = !1, C.style["will-change"] = "", this._hideClone(), N(C, this.options.chosenClass, !1), y.clone = C), n.cloneId = Gt(function() {
|
|
1534
|
+
P("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide || x.insertBefore(C, h), n._hideClone(), I({
|
|
1535
1535
|
sortable: n,
|
|
1536
1536
|
name: "clone"
|
|
1537
1537
|
}));
|
|
@@ -1540,10 +1540,10 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1540
1540
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1541
1541
|
_onDragOver: function(t) {
|
|
1542
1542
|
var e = this.el, n = t.target, r, o, a, l = this.options, s = l.group, d = y.active, p = Bt === s, u = l.sort, c = T || d, m, f = this, v = !1;
|
|
1543
|
-
if (
|
|
1543
|
+
if ($e)
|
|
1544
1544
|
return;
|
|
1545
|
-
function S(
|
|
1546
|
-
P(
|
|
1545
|
+
function S(At, ki) {
|
|
1546
|
+
P(At, f, X({
|
|
1547
1547
|
evt: t,
|
|
1548
1548
|
isOwner: p,
|
|
1549
1549
|
axis: m ? "vertical" : "horizontal",
|
|
@@ -1555,7 +1555,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1555
1555
|
target: n,
|
|
1556
1556
|
completed: H,
|
|
1557
1557
|
onMove: function(Pe, Vi) {
|
|
1558
|
-
return Ft(
|
|
1558
|
+
return Ft(x, e, h, r, Pe, D(Pe), t, Vi);
|
|
1559
1559
|
},
|
|
1560
1560
|
changed: et
|
|
1561
1561
|
}, ki));
|
|
@@ -1563,12 +1563,12 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1563
1563
|
function U() {
|
|
1564
1564
|
S("dragOverAnimationCapture"), f.captureAnimationState(), f !== c && c.captureAnimationState();
|
|
1565
1565
|
}
|
|
1566
|
-
function H(
|
|
1566
|
+
function H(At) {
|
|
1567
1567
|
return S("dragOverCompleted", {
|
|
1568
|
-
insertion:
|
|
1569
|
-
}),
|
|
1568
|
+
insertion: At
|
|
1569
|
+
}), At && (p ? d._hideClone() : d._showClone(f), f !== c && (N(h, T ? T.options.ghostClass : d.options.ghostClass, !1), N(h, l.ghostClass, !0)), T !== f && f !== y.active ? T = f : f === y.active && T && (T = null), c === f && (f._ignoreWhileAnimating = n), f.animateAll(function() {
|
|
1570
1570
|
S("dragOverAnimationComplete"), f._ignoreWhileAnimating = null;
|
|
1571
|
-
}), f !== c && (c.animateAll(), c._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (pt = null), !l.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[R]._isOutsideThisEl(t.target), !
|
|
1571
|
+
}), f !== c && (c.animateAll(), c._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (pt = null), !l.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[R]._isOutsideThisEl(t.target), !At && ot(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), v = !0;
|
|
1572
1572
|
}
|
|
1573
1573
|
function et() {
|
|
1574
1574
|
k = B(h), q = B(h, l.draggable), I({
|
|
@@ -1584,42 +1584,42 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1584
1584
|
return v;
|
|
1585
1585
|
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || f._ignoreWhileAnimating === n)
|
|
1586
1586
|
return H(!1);
|
|
1587
|
-
if (Qt = !1, d && !l.disabled && (p ? u || (a =
|
|
1587
|
+
if (Qt = !1, d && !l.disabled && (p ? u || (a = $ !== x) : T === this || (this.lastPutMode = Bt.checkPull(this, d, h, t)) && s.checkPut(this, d, h, t))) {
|
|
1588
1588
|
if (m = this._getDirection(t, n) === "vertical", r = D(h), S("dragOverValid"), y.eventCanceled)
|
|
1589
1589
|
return v;
|
|
1590
1590
|
if (a)
|
|
1591
|
-
return
|
|
1591
|
+
return $ = x, U(), this._hideClone(), S("revert"), y.eventCanceled || (st ? x.insertBefore(h, st) : x.appendChild(h)), H(!0);
|
|
1592
1592
|
var W = Te(e, l.draggable);
|
|
1593
1593
|
if (!W || wn(t, m, this) && !W.animated) {
|
|
1594
1594
|
if (W === h)
|
|
1595
1595
|
return H(!1);
|
|
1596
|
-
if (W && e === t.target && (n = W), n && (o = D(n)), Ft(
|
|
1597
|
-
return U(), W && W.nextSibling ? e.insertBefore(h, W.nextSibling) : e.appendChild(h),
|
|
1596
|
+
if (W && e === t.target && (n = W), n && (o = D(n)), Ft(x, e, h, r, n, o, t, !!n) !== !1)
|
|
1597
|
+
return U(), W && W.nextSibling ? e.insertBefore(h, W.nextSibling) : e.appendChild(h), $ = e, et(), H(!0);
|
|
1598
1598
|
} else if (W && En(t, m, this)) {
|
|
1599
1599
|
var re = _t(e, 0, l, !0);
|
|
1600
1600
|
if (re === h)
|
|
1601
1601
|
return H(!1);
|
|
1602
|
-
if (n = re, o = D(n), Ft(
|
|
1603
|
-
return U(), e.insertBefore(h, re),
|
|
1602
|
+
if (n = re, o = D(n), Ft(x, e, h, r, n, o, t, !1) !== !1)
|
|
1603
|
+
return U(), e.insertBefore(h, re), $ = e, et(), H(!0);
|
|
1604
1604
|
} else if (n.parentNode === e) {
|
|
1605
1605
|
o = D(n);
|
|
1606
|
-
var ut = 0, oe, Mi = h.parentNode !== e, Oe = !mn(h.animated && h.toRect || r, n.animated && n.toRect || o, m), He = m ? "top" : "left",
|
|
1607
|
-
pt !== n && (oe = o[He], Lt = !1, Rt = !Oe && l.invertSwap || Mi), ut =
|
|
1608
|
-
var
|
|
1606
|
+
var ut = 0, oe, Mi = h.parentNode !== e, Oe = !mn(h.animated && h.toRect || r, n.animated && n.toRect || o, m), He = m ? "top" : "left", xt = Je(n, "top", "top") || Je(h, "top", "top"), Ni = xt ? xt.scrollTop : void 0;
|
|
1607
|
+
pt !== n && (oe = o[He], Lt = !1, Rt = !Oe && l.invertSwap || Mi), ut = xn(t, n, o, m, Oe ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Rt, pt === n);
|
|
1608
|
+
var Ct;
|
|
1609
1609
|
if (ut !== 0) {
|
|
1610
1610
|
var Le = B(h);
|
|
1611
1611
|
do
|
|
1612
|
-
Le -= ut,
|
|
1613
|
-
while (
|
|
1612
|
+
Le -= ut, Ct = $.children[Le];
|
|
1613
|
+
while (Ct && (g(Ct, "display") === "none" || Ct === b));
|
|
1614
1614
|
}
|
|
1615
|
-
if (ut === 0 ||
|
|
1615
|
+
if (ut === 0 || Ct === n)
|
|
1616
1616
|
return H(!1);
|
|
1617
1617
|
pt = n, Ht = ut;
|
|
1618
|
-
var Ie = n.nextElementSibling,
|
|
1619
|
-
|
|
1620
|
-
var Vt = Ft(
|
|
1618
|
+
var Ie = n.nextElementSibling, $t = !1;
|
|
1619
|
+
$t = ut === 1;
|
|
1620
|
+
var Vt = Ft(x, e, h, r, n, o, t, $t);
|
|
1621
1621
|
if (Vt !== !1)
|
|
1622
|
-
return (Vt === 1 || Vt === -1) && (
|
|
1622
|
+
return (Vt === 1 || Vt === -1) && ($t = Vt === 1), $e = !0, setTimeout(_n, 30), U(), $t && !Ie ? e.appendChild(h) : n.parentNode.insertBefore(h, $t ? Ie : n), xt && dn(xt, 0, Ni - xt.scrollTop), $ = h.parentNode, oe !== void 0 && !Rt && (Wt = Math.abs(oe - D(n)[He])), et(), H(!0);
|
|
1623
1623
|
}
|
|
1624
1624
|
if (e.contains(h))
|
|
1625
1625
|
return H(!1);
|
|
@@ -1638,58 +1638,58 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1638
1638
|
var e = this.el, n = this.options;
|
|
1639
1639
|
if (k = B(h), q = B(h, n.draggable), P("drop", this, {
|
|
1640
1640
|
evt: t
|
|
1641
|
-
}),
|
|
1641
|
+
}), $ = h && h.parentNode, k = B(h), q = B(h, n.draggable), y.eventCanceled) {
|
|
1642
1642
|
this._nulling();
|
|
1643
1643
|
return;
|
|
1644
1644
|
}
|
|
1645
|
-
gt = !1, Rt = !1, Lt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer),
|
|
1645
|
+
gt = !1, Rt = !1, Lt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ae(this.cloneId), Ae(this._dragStartId), this.nativeDraggable && (E(document, "drop", this), E(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Xt && g(document.body, "user-select", ""), g(h, "transform", ""), t && (Tt && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), b && b.parentNode && b.parentNode.removeChild(b), (x === $ || T && T.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), h && (this.nativeDraggable && E(h, "dragend", this), _e(h), h.style["will-change"] = "", Tt && !gt && N(h, T ? T.options.ghostClass : this.options.ghostClass, !1), N(h, this.options.chosenClass, !1), I({
|
|
1646
1646
|
sortable: this,
|
|
1647
1647
|
name: "unchoose",
|
|
1648
|
-
toEl:
|
|
1648
|
+
toEl: $,
|
|
1649
1649
|
newIndex: null,
|
|
1650
1650
|
newDraggableIndex: null,
|
|
1651
1651
|
originalEvent: t
|
|
1652
|
-
}),
|
|
1653
|
-
rootEl:
|
|
1652
|
+
}), x !== $ ? (k >= 0 && (I({
|
|
1653
|
+
rootEl: $,
|
|
1654
1654
|
name: "add",
|
|
1655
|
-
toEl:
|
|
1656
|
-
fromEl:
|
|
1655
|
+
toEl: $,
|
|
1656
|
+
fromEl: x,
|
|
1657
1657
|
originalEvent: t
|
|
1658
1658
|
}), I({
|
|
1659
1659
|
sortable: this,
|
|
1660
1660
|
name: "remove",
|
|
1661
|
-
toEl:
|
|
1661
|
+
toEl: $,
|
|
1662
1662
|
originalEvent: t
|
|
1663
1663
|
}), I({
|
|
1664
|
-
rootEl:
|
|
1664
|
+
rootEl: $,
|
|
1665
1665
|
name: "sort",
|
|
1666
|
-
toEl:
|
|
1667
|
-
fromEl:
|
|
1666
|
+
toEl: $,
|
|
1667
|
+
fromEl: x,
|
|
1668
1668
|
originalEvent: t
|
|
1669
1669
|
}), I({
|
|
1670
1670
|
sortable: this,
|
|
1671
1671
|
name: "sort",
|
|
1672
|
-
toEl:
|
|
1672
|
+
toEl: $,
|
|
1673
1673
|
originalEvent: t
|
|
1674
1674
|
})), T && T.save()) : k !== mt && k >= 0 && (I({
|
|
1675
1675
|
sortable: this,
|
|
1676
1676
|
name: "update",
|
|
1677
|
-
toEl:
|
|
1677
|
+
toEl: $,
|
|
1678
1678
|
originalEvent: t
|
|
1679
1679
|
}), I({
|
|
1680
1680
|
sortable: this,
|
|
1681
1681
|
name: "sort",
|
|
1682
|
-
toEl:
|
|
1682
|
+
toEl: $,
|
|
1683
1683
|
originalEvent: t
|
|
1684
1684
|
})), y.active && ((k == null || k === -1) && (k = mt, q = Ot), I({
|
|
1685
1685
|
sortable: this,
|
|
1686
1686
|
name: "end",
|
|
1687
|
-
toEl:
|
|
1687
|
+
toEl: $,
|
|
1688
1688
|
originalEvent: t
|
|
1689
1689
|
}), this.save()))), this._nulling();
|
|
1690
1690
|
},
|
|
1691
1691
|
_nulling: function() {
|
|
1692
|
-
P("nulling", this),
|
|
1692
|
+
P("nulling", this), x = h = $ = b = st = C = Yt = K = rt = F = Tt = k = q = mt = Ot = pt = Ht = T = Bt = y.dragged = y.ghost = y.clone = y.active = null, ee.forEach(function(t) {
|
|
1693
1693
|
t.checked = !0;
|
|
1694
1694
|
}), ee.length = ve = ye = 0;
|
|
1695
1695
|
},
|
|
@@ -1714,7 +1714,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1714
1714
|
*/
|
|
1715
1715
|
toArray: function() {
|
|
1716
1716
|
for (var t = [], e, n = this.el.children, r = 0, o = n.length, a = this.options; r < o; r++)
|
|
1717
|
-
e = n[r], j(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) ||
|
|
1717
|
+
e = n[r], j(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || $n(e));
|
|
1718
1718
|
return t;
|
|
1719
1719
|
},
|
|
1720
1720
|
/**
|
|
@@ -1773,7 +1773,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1773
1773
|
if (!K) {
|
|
1774
1774
|
if (P("hideClone", this), y.eventCanceled)
|
|
1775
1775
|
return;
|
|
1776
|
-
g(
|
|
1776
|
+
g(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), K = !0;
|
|
1777
1777
|
}
|
|
1778
1778
|
},
|
|
1779
1779
|
_showClone: function(t) {
|
|
@@ -1784,7 +1784,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1784
1784
|
if (K) {
|
|
1785
1785
|
if (P("showClone", this), y.eventCanceled)
|
|
1786
1786
|
return;
|
|
1787
|
-
h.parentNode ==
|
|
1787
|
+
h.parentNode == x && !this.options.group.revertClone ? x.insertBefore(C, h) : st ? x.insertBefore(C, st) : x.appendChild(C), this.options.group.revertClone && this.animate(h, C), g(C, "display", ""), K = !1;
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
};
|
|
@@ -1802,7 +1802,7 @@ function _e(i) {
|
|
|
1802
1802
|
i.draggable = !1;
|
|
1803
1803
|
}
|
|
1804
1804
|
function _n() {
|
|
1805
|
-
|
|
1805
|
+
$e = !1;
|
|
1806
1806
|
}
|
|
1807
1807
|
function En(i, t, e) {
|
|
1808
1808
|
var n = D(_t(e.el, 0, e.options, !0)), r = 10;
|
|
@@ -1812,7 +1812,7 @@ function wn(i, t, e) {
|
|
|
1812
1812
|
var n = D(Te(e.el, e.options.draggable)), r = 10;
|
|
1813
1813
|
return t ? i.clientX > n.right + r || i.clientX <= n.right && i.clientY > n.bottom && i.clientX >= n.left : i.clientX > n.right && i.clientY > n.top || i.clientX <= n.right && i.clientY > n.bottom + r;
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function xn(i, t, e, n, r, o, a, l) {
|
|
1816
1816
|
var s = n ? i.clientY : i.clientX, d = n ? e.height : e.width, p = n ? e.top : e.left, u = n ? e.bottom : e.right, c = !1;
|
|
1817
1817
|
if (!a) {
|
|
1818
1818
|
if (l && Wt < d * r) {
|
|
@@ -1821,19 +1821,19 @@ function Cn(i, t, e, n, r, o, a, l) {
|
|
|
1821
1821
|
else if (Ht === 1 ? s < p + Wt : s > u - Wt)
|
|
1822
1822
|
return -Ht;
|
|
1823
1823
|
} else if (s > p + d * (1 - r) / 2 && s < u - d * (1 - r) / 2)
|
|
1824
|
-
return
|
|
1824
|
+
return Cn(t);
|
|
1825
1825
|
}
|
|
1826
1826
|
return c = c || a, c && (s < p + d * o / 2 || s > u - d * o / 2) ? s > p + d / 2 ? 1 : -1 : 0;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Cn(i) {
|
|
1829
1829
|
return B(h) < B(i) ? 1 : -1;
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function $n(i) {
|
|
1832
1832
|
for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
|
|
1833
1833
|
n += t.charCodeAt(e);
|
|
1834
1834
|
return n.toString(36);
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function An(i) {
|
|
1837
1837
|
ee.length = 0;
|
|
1838
1838
|
for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1839
1839
|
var n = t[e];
|
|
@@ -1843,7 +1843,7 @@ function xn(i) {
|
|
|
1843
1843
|
function Gt(i) {
|
|
1844
1844
|
return setTimeout(i, 0);
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function Ae(i) {
|
|
1847
1847
|
return clearTimeout(i);
|
|
1848
1848
|
}
|
|
1849
1849
|
ne && w(document, "touchmove", function(i) {
|
|
@@ -1853,7 +1853,7 @@ y.utils = {
|
|
|
1853
1853
|
on: w,
|
|
1854
1854
|
off: E,
|
|
1855
1855
|
css: g,
|
|
1856
|
-
find:
|
|
1856
|
+
find: xi,
|
|
1857
1857
|
is: function(t, e) {
|
|
1858
1858
|
return !!j(t, e, t, !1);
|
|
1859
1859
|
},
|
|
@@ -1861,11 +1861,11 @@ y.utils = {
|
|
|
1861
1861
|
throttle: ln,
|
|
1862
1862
|
closest: j,
|
|
1863
1863
|
toggleClass: N,
|
|
1864
|
-
clone:
|
|
1864
|
+
clone: Ci,
|
|
1865
1865
|
index: B,
|
|
1866
1866
|
nextTick: Gt,
|
|
1867
|
-
cancelNextTick:
|
|
1868
|
-
detectDirection:
|
|
1867
|
+
cancelNextTick: Ae,
|
|
1868
|
+
detectDirection: Ai,
|
|
1869
1869
|
getChild: _t
|
|
1870
1870
|
};
|
|
1871
1871
|
y.get = function(i) {
|
|
@@ -2161,6 +2161,67 @@ summary > .layer {
|
|
|
2161
2161
|
margin-left: -1px;
|
|
2162
2162
|
}
|
|
2163
2163
|
|
|
2164
|
+
[data-layerconfig] button {
|
|
2165
|
+
margin-left: 64px;
|
|
2166
|
+
margin-bottom: 21px;
|
|
2167
|
+
margin-top: 9px;
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
label[for=optional] {
|
|
2171
|
+
font-size: 21px;
|
|
2172
|
+
font-weight: 400;
|
|
2173
|
+
margin-bottom: 9px;
|
|
2174
|
+
display: block;
|
|
2175
|
+
}
|
|
2176
|
+
select[name=optional] {
|
|
2177
|
+
margin-right: 6px;
|
|
2178
|
+
margin-bottom: 18px;
|
|
2179
|
+
height: 36px;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
// Style adjacent button
|
|
2183
|
+
select[name=optional] + button {
|
|
2184
|
+
width: 20px;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
.slider-control + details {
|
|
2188
|
+
margin-left: 60px;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
.slider-control + details summary {
|
|
2192
|
+
color: #3B6289;
|
|
2193
|
+
font-size: 14px;
|
|
2194
|
+
display: flex;
|
|
2195
|
+
flex-direction: row;
|
|
2196
|
+
align-items: center;
|
|
2197
|
+
font-weight: 500;
|
|
2198
|
+
margin-bottom: 15px;
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
.slider-control + details li {
|
|
2202
|
+
display: flex;
|
|
2203
|
+
height: 30px;
|
|
2204
|
+
flex-direction: row;
|
|
2205
|
+
align-items: center;
|
|
2206
|
+
border-top: none;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
.slider-control + details li > div {
|
|
2210
|
+
width: 124px;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
.slider-control + details summary::before {
|
|
2214
|
+
display: block;
|
|
2215
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
|
|
2216
|
+
font-size: 13px;
|
|
2217
|
+
width: 24px;
|
|
2218
|
+
height: 24px;
|
|
2219
|
+
transform-origin: center;
|
|
2220
|
+
}
|
|
2221
|
+
.slider-control + details[open] > summary:before {
|
|
2222
|
+
transform: rotate(90deg);
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2164
2225
|
[data-type=group] .title::before {
|
|
2165
2226
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236889A0' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-outline%3C/title%3E%3Cpath d='M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z' /%3E%3C/svg%3E");
|
|
2166
2227
|
}
|
|
@@ -2298,7 +2359,7 @@ li.sortable-drag {
|
|
|
2298
2359
|
li.sortable-ghost {
|
|
2299
2360
|
}
|
|
2300
2361
|
`;
|
|
2301
|
-
var Hn = Object.defineProperty, Ln = Object.getOwnPropertyDescriptor,
|
|
2362
|
+
var Hn = Object.defineProperty, Ln = Object.getOwnPropertyDescriptor, A = (i, t, e, n) => {
|
|
2302
2363
|
for (var r = n > 1 ? void 0 : n ? Ln(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
2303
2364
|
(a = i[o]) && (r = (n ? a(t, e, r) : a(r)) || r);
|
|
2304
2365
|
return n && r && Hn(t, e, r), r;
|
|
@@ -2318,10 +2379,16 @@ let V = class extends vt {
|
|
|
2318
2379
|
), n;
|
|
2319
2380
|
};
|
|
2320
2381
|
return r(i, t, e), n;
|
|
2321
|
-
}, this.findLayerById = (i, t) => this.filterLayers(i, "id", t)[0], this.getLayerType = (i, t) =>
|
|
2322
|
-
|
|
2323
|
-
i.
|
|
2324
|
-
|
|
2382
|
+
}, this.findLayerById = (i, t) => this.filterLayers(i, "id", t)[0], this.getLayerType = (i, t) => {
|
|
2383
|
+
var e;
|
|
2384
|
+
return i.getLayers ? "group" : t.getInteractions().getArray().filter((n) => n.freehand_ !== void 0).map((n) => {
|
|
2385
|
+
var r;
|
|
2386
|
+
return (r = n.source_) == null ? void 0 : r.ol_uid;
|
|
2387
|
+
}).includes(i.getSource ? (e = i.getSource()) == null ? void 0 : e.ol_uid : !1) ? "draw" : (
|
|
2388
|
+
// @ts-ignore
|
|
2389
|
+
i.declutter_ !== void 0 ? "vector" : "raster"
|
|
2390
|
+
);
|
|
2391
|
+
};
|
|
2325
2392
|
}
|
|
2326
2393
|
_updateControl(i) {
|
|
2327
2394
|
const t = (e) => {
|
|
@@ -2394,7 +2461,7 @@ let V = class extends vt {
|
|
|
2394
2461
|
<div class="left">
|
|
2395
2462
|
<input
|
|
2396
2463
|
type="${o.get("layerControlExclusive") ? "radio" : "checkbox"}"
|
|
2397
|
-
.checked="${
|
|
2464
|
+
.checked="${Ce(o.getVisible())}"
|
|
2398
2465
|
@click=${() => {
|
|
2399
2466
|
this.toggleLayerVisibility(o, a);
|
|
2400
2467
|
}}
|
|
@@ -2441,7 +2508,7 @@ let V = class extends vt {
|
|
|
2441
2508
|
`;
|
|
2442
2509
|
}, n = (o, a) => O`
|
|
2443
2510
|
<ul data-group="${a ?? _}">
|
|
2444
|
-
${
|
|
2511
|
+
${xe(
|
|
2445
2512
|
o,
|
|
2446
2513
|
(l) => l.get(this.layerIdentifier),
|
|
2447
2514
|
(l) => {
|
|
@@ -2479,7 +2546,7 @@ let V = class extends vt {
|
|
|
2479
2546
|
() => O`
|
|
2480
2547
|
<label for="optional">Optional layers</label>
|
|
2481
2548
|
|
|
2482
|
-
<select name="optional">
|
|
2549
|
+
<select name="optional" data-cy="optionalLayers">
|
|
2483
2550
|
<option disabled selected value>
|
|
2484
2551
|
-- select an optional layer to add --
|
|
2485
2552
|
</option>
|
|
@@ -2543,8 +2610,7 @@ let V = class extends vt {
|
|
|
2543
2610
|
...this.layerCollection.getArray().map((n) => n.get(this.layerIdentifier))
|
|
2544
2611
|
].reverse(),
|
|
2545
2612
|
set: (n) => {
|
|
2546
|
-
|
|
2547
|
-
r.forEach((o, a) => {
|
|
2613
|
+
n.toArray().reverse().forEach((o, a) => {
|
|
2548
2614
|
if (e) {
|
|
2549
2615
|
const s = this.findLayerById(
|
|
2550
2616
|
this.layerCollection.getArray(),
|
|
@@ -2569,40 +2635,40 @@ let V = class extends vt {
|
|
|
2569
2635
|
});
|
|
2570
2636
|
}
|
|
2571
2637
|
};
|
|
2572
|
-
|
|
2638
|
+
A([
|
|
2573
2639
|
wt()
|
|
2574
2640
|
], V.prototype, "olMap", 2);
|
|
2575
|
-
|
|
2641
|
+
A([
|
|
2576
2642
|
wt()
|
|
2577
2643
|
], V.prototype, "layerCollection", 2);
|
|
2578
|
-
|
|
2644
|
+
A([
|
|
2579
2645
|
wt()
|
|
2580
2646
|
], V.prototype, "layerArray", 2);
|
|
2581
|
-
|
|
2647
|
+
A([
|
|
2582
2648
|
wt()
|
|
2583
2649
|
], V.prototype, "optionalLayerArray", 2);
|
|
2584
|
-
|
|
2650
|
+
A([
|
|
2585
2651
|
M()
|
|
2586
2652
|
], V.prototype, "for", 2);
|
|
2587
|
-
|
|
2653
|
+
A([
|
|
2588
2654
|
M()
|
|
2589
2655
|
], V.prototype, "layerIdentifier", 2);
|
|
2590
|
-
|
|
2656
|
+
A([
|
|
2591
2657
|
M()
|
|
2592
2658
|
], V.prototype, "layerTitle", 2);
|
|
2593
|
-
|
|
2659
|
+
A([
|
|
2594
2660
|
M()
|
|
2595
2661
|
], V.prototype, "sortBy", 2);
|
|
2596
|
-
|
|
2662
|
+
A([
|
|
2597
2663
|
M({ type: Array })
|
|
2598
2664
|
], V.prototype, "layerConfig", 2);
|
|
2599
|
-
|
|
2665
|
+
A([
|
|
2600
2666
|
M({ type: Boolean })
|
|
2601
2667
|
], V.prototype, "externalLayerConfig", 2);
|
|
2602
|
-
|
|
2668
|
+
A([
|
|
2603
2669
|
M({ type: Boolean })
|
|
2604
2670
|
], V.prototype, "unstyled", 2);
|
|
2605
|
-
V =
|
|
2671
|
+
V = A([
|
|
2606
2672
|
gi("eox-layercontrol")
|
|
2607
2673
|
], V);
|
|
2608
2674
|
let Y = class extends vt {
|
|
@@ -2642,7 +2708,7 @@ let Y = class extends vt {
|
|
|
2642
2708
|
<div>
|
|
2643
2709
|
<slot></slot>
|
|
2644
2710
|
${this.for ? O`layer: ${this._currentLayer.get("name")}` : _}
|
|
2645
|
-
${
|
|
2711
|
+
${xe(
|
|
2646
2712
|
this.layerConfig.filter(
|
|
2647
2713
|
(i) => this.for ? i !== "opacity" : !0
|
|
2648
2714
|
),
|
|
@@ -2655,7 +2721,7 @@ let Y = class extends vt {
|
|
|
2655
2721
|
min="0"
|
|
2656
2722
|
max="1"
|
|
2657
2723
|
step="0.01"
|
|
2658
|
-
value="${
|
|
2724
|
+
value="${Ce(this._currentLayer.getOpacity())}"
|
|
2659
2725
|
@input=${(t) => this._handleInput(t, i)}
|
|
2660
2726
|
/>
|
|
2661
2727
|
</div>
|
|
@@ -2665,7 +2731,7 @@ let Y = class extends vt {
|
|
|
2665
2731
|
<details open="${this.for ? !0 : _}">
|
|
2666
2732
|
<summary>Layer config</summary>
|
|
2667
2733
|
<ul>
|
|
2668
|
-
${
|
|
2734
|
+
${xe(
|
|
2669
2735
|
Object.keys(this._configList),
|
|
2670
2736
|
(i) => i,
|
|
2671
2737
|
(i) => O` <li>
|
|
@@ -2674,7 +2740,7 @@ let Y = class extends vt {
|
|
|
2674
2740
|
type="range"
|
|
2675
2741
|
min="${["red", "green", "blue"].includes(i) ? 1 : 2e3}"
|
|
2676
2742
|
max="${["red", "green", "blue"].includes(i) ? 4 : 5e3}"
|
|
2677
|
-
value="${
|
|
2743
|
+
value="${Ce(
|
|
2678
2744
|
// @ts-ignore
|
|
2679
2745
|
this._configList[i]
|
|
2680
2746
|
)}"
|
|
@@ -2691,31 +2757,31 @@ let Y = class extends vt {
|
|
|
2691
2757
|
`;
|
|
2692
2758
|
}
|
|
2693
2759
|
};
|
|
2694
|
-
|
|
2760
|
+
A([
|
|
2695
2761
|
M()
|
|
2696
2762
|
], Y.prototype, "for", 2);
|
|
2697
|
-
|
|
2763
|
+
A([
|
|
2698
2764
|
M({ type: Array })
|
|
2699
2765
|
], Y.prototype, "layerConfig", 2);
|
|
2700
|
-
|
|
2766
|
+
A([
|
|
2701
2767
|
M({ type: Object, attribute: !1 })
|
|
2702
2768
|
], Y.prototype, "layerControl", 2);
|
|
2703
|
-
|
|
2769
|
+
A([
|
|
2704
2770
|
M({ type: Object, attribute: !1 })
|
|
2705
2771
|
], Y.prototype, "layer", 2);
|
|
2706
|
-
|
|
2772
|
+
A([
|
|
2707
2773
|
M({ type: Boolean })
|
|
2708
2774
|
], Y.prototype, "external", 2);
|
|
2709
|
-
|
|
2775
|
+
A([
|
|
2710
2776
|
M({ type: Boolean })
|
|
2711
2777
|
], Y.prototype, "unstyled", 2);
|
|
2712
|
-
|
|
2778
|
+
A([
|
|
2713
2779
|
wt()
|
|
2714
2780
|
], Y.prototype, "_currentLayer", 2);
|
|
2715
|
-
|
|
2781
|
+
A([
|
|
2716
2782
|
wt()
|
|
2717
2783
|
], Y.prototype, "_configList", 2);
|
|
2718
|
-
Y =
|
|
2784
|
+
Y = A([
|
|
2719
2785
|
gi("eox-layerconfig")
|
|
2720
2786
|
], Y);
|
|
2721
2787
|
export {
|