Skip to content

Commit 8154df0

Browse files
committed
Cursor fix
1 parent 95b79d9 commit 8154df0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/mapml.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,6 @@ summary {
355355
visibility: unset!important;
356356
}
357357

358-
.mapml-draggable {
358+
.mapml-draggable * {
359359
cursor: row-resize;
360360
}

src/mapml/layers/MapLayer.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,7 @@ export var MapMLLayer = L.Layer.extend({
543543
controls.getBoundingClientRect().top > control.getBoundingClientRect().top ||
544544
controls.getBoundingClientRect().bottom < control.getBoundingClientRect().bottom) return;
545545

546-
for(let c of controls.children){
547-
c.querySelector("summary").classList.add("mapml-draggable");
548-
}
549-
546+
controls.classList.add("mapml-draggable");
550547
let x = moveEvent.clientX, y = moveEvent.clientY,
551548
elementAt = root.elementFromPoint(x, y),
552549
swapControl = !elementAt || !elementAt.closest("fieldset") ? control : elementAt.closest("fieldset");
@@ -574,10 +571,11 @@ export var MapMLLayer = L.Layer.extend({
574571
viewer.insertAdjacentElement("beforeend", layerEl);
575572
layerEl.removeAttribute("data-moving");
576573

577-
c.querySelector("summary").classList.remove("mapml-draggable");
574+
578575
layerEl._layer.setZIndex(zIndex);
579576
zIndex++;
580577
}
578+
controls.classList.remove("mapml-draggable");
581579
document.body.onmousemove = document.body.onmouseup = null;
582580
};
583581
};

0 commit comments

Comments
 (0)