mudlet-map-editor 0.16.0 → 0.16.2
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-lib/index.js +28 -25
- package/dist-lib/styles.css +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -6729,38 +6729,39 @@ function un(e, t, n, r, i) {
|
|
|
6729
6729
|
return c;
|
|
6730
6730
|
}
|
|
6731
6731
|
function dn(e, t, n, r, i, a, o, s) {
|
|
6732
|
-
let c = []
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6732
|
+
let c = [];
|
|
6733
|
+
for (let o of e.hitTester.pickAll(i, a)) {
|
|
6734
|
+
if (o.kind !== "room") continue;
|
|
6735
|
+
let e = t.rooms[o.id];
|
|
6736
|
+
e && e.area === n && e.z === r && c.push({
|
|
6736
6737
|
kind: "room",
|
|
6737
|
-
id:
|
|
6738
|
+
id: o.id
|
|
6738
6739
|
});
|
|
6739
6740
|
}
|
|
6740
|
-
let
|
|
6741
|
-
for (let e =
|
|
6741
|
+
let l = un(n, r, i, a, s);
|
|
6742
|
+
for (let e = l.length - 1; e >= 0; e--) c.push({
|
|
6742
6743
|
kind: "label",
|
|
6743
|
-
id:
|
|
6744
|
-
areaId:
|
|
6744
|
+
id: l[e].id,
|
|
6745
|
+
areaId: l[e].areaId
|
|
6745
6746
|
});
|
|
6746
|
-
let
|
|
6747
|
-
|
|
6747
|
+
let u = yn(e, i, a, o);
|
|
6748
|
+
u && c.push({
|
|
6748
6749
|
kind: "customLine",
|
|
6749
|
-
roomId:
|
|
6750
|
-
exitName:
|
|
6750
|
+
roomId: u.roomId,
|
|
6751
|
+
exitName: u.exitName
|
|
6751
6752
|
});
|
|
6752
|
-
let
|
|
6753
|
-
|
|
6753
|
+
let d = vn(e, i, a, o);
|
|
6754
|
+
d && c.push({
|
|
6754
6755
|
kind: "exit",
|
|
6755
|
-
fromId:
|
|
6756
|
-
toId:
|
|
6757
|
-
dir:
|
|
6756
|
+
fromId: d.fromId,
|
|
6757
|
+
toId: d.toId,
|
|
6758
|
+
dir: d.dir
|
|
6758
6759
|
});
|
|
6759
|
-
let
|
|
6760
|
-
return
|
|
6760
|
+
let f = Sn(e, i, a, o);
|
|
6761
|
+
return f && c.push({
|
|
6761
6762
|
kind: "stub",
|
|
6762
|
-
roomId:
|
|
6763
|
-
dir:
|
|
6763
|
+
roomId: f.roomId,
|
|
6764
|
+
dir: f.dir
|
|
6764
6765
|
}), c;
|
|
6765
6766
|
}
|
|
6766
6767
|
function fn(e, t, n, r) {
|
|
@@ -8562,7 +8563,7 @@ function er({ selection: e, map: t, sceneRef: n }) {
|
|
|
8562
8563
|
L.setState({ selection: {
|
|
8563
8564
|
...e,
|
|
8564
8565
|
pointIndex: t
|
|
8565
|
-
} })
|
|
8566
|
+
} });
|
|
8566
8567
|
}, j = (e, t) => {
|
|
8567
8568
|
if (w && w.index === e && w.axis === t) return w.value;
|
|
8568
8569
|
let n = a[e];
|
|
@@ -8639,7 +8640,7 @@ function er({ selection: e, map: t, sceneRef: n }) {
|
|
|
8639
8640
|
})
|
|
8640
8641
|
});
|
|
8641
8642
|
}, F = (e, t) => {
|
|
8642
|
-
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (T(null), e.currentTarget.blur()), (e.key === "Delete" || e.key === "Backspace") &&
|
|
8643
|
+
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && (T(null), e.currentTarget.blur()), (e.key === "Delete" || e.key === "Backspace") && e.currentTarget.value === "" && (e.preventDefault(), P(t));
|
|
8643
8644
|
};
|
|
8644
8645
|
return /* @__PURE__ */ v(g, { children: [
|
|
8645
8646
|
/* @__PURE__ */ _("h3", { children: r("customLine.heading") }),
|
|
@@ -8768,7 +8769,9 @@ function er({ selection: e, map: t, sceneRef: n }) {
|
|
|
8768
8769
|
children: r("customLine.waypoints")
|
|
8769
8770
|
}), a.map((t, n) => /* @__PURE__ */ v("div", {
|
|
8770
8771
|
className: `cl-waypoint-row${e.pointIndex === n ? " active" : ""}`,
|
|
8771
|
-
onMouseDown: () =>
|
|
8772
|
+
onMouseDown: (e) => {
|
|
8773
|
+
e.target.tagName !== "INPUT" && A(n);
|
|
8774
|
+
},
|
|
8772
8775
|
children: [
|
|
8773
8776
|
/* @__PURE__ */ _("span", {
|
|
8774
8777
|
className: "cl-waypoint-idx",
|