floor-editor-ts 1.3.13 → 1.3.14
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/floor-editor.es.js +35 -32
- package/dist/floor-editor.es.js.map +1 -1
- package/package.json +1 -1
package/dist/floor-editor.es.js
CHANGED
|
@@ -5983,7 +5983,7 @@ function resolveCameraAreaStyle(source, fallbackIndex = 0) {
|
|
|
5983
5983
|
const areaRaw = (_source$props$area = source === null || source === void 0 || (_source$props = source.props) === null || _source$props === void 0 ? void 0 : _source$props.area) !== null && _source$props$area !== void 0 ? _source$props$area : source && "area" in source ? source.area : void 0;
|
|
5984
5984
|
const colorRaw = (_source$props$areaCol = source === null || source === void 0 || (_source$props2 = source.props) === null || _source$props2 === void 0 ? void 0 : _source$props2.areaColor) !== null && _source$props$areaCol !== void 0 ? _source$props$areaCol : source && "areaColor" in source ? source.areaColor : void 0;
|
|
5985
5985
|
return {
|
|
5986
|
-
name: String(areaRaw !== null && areaRaw !== void 0 ? areaRaw : "").trim() || "
|
|
5986
|
+
name: String(areaRaw !== null && areaRaw !== void 0 ? areaRaw : "").trim() || "Zone",
|
|
5987
5987
|
color: String(colorRaw !== null && colorRaw !== void 0 ? colorRaw : "").trim() || nextZoneColor(fallbackIndex)
|
|
5988
5988
|
};
|
|
5989
5989
|
}
|
|
@@ -7067,7 +7067,7 @@ function addZone(shape, points, nameOrOpts, colorArg) {
|
|
|
7067
7067
|
const serial = ((_opts$cameraSerial = opts.cameraSerial) === null || _opts$cameraSerial === void 0 ? void 0 : _opts$cameraSerial.trim()) || void 0;
|
|
7068
7068
|
f.zones.push({
|
|
7069
7069
|
id,
|
|
7070
|
-
name: ((_opts$name = opts.name) === null || _opts$name === void 0 ? void 0 : _opts$name.trim()) || `
|
|
7070
|
+
name: ((_opts$name = opts.name) === null || _opts$name === void 0 ? void 0 : _opts$name.trim()) || `Zone ${count + 1}`,
|
|
7071
7071
|
shape,
|
|
7072
7072
|
points: points.map((p) => ({
|
|
7073
7073
|
x: p.x,
|
|
@@ -7405,8 +7405,8 @@ function assignedCameraToProps(cam) {
|
|
|
7405
7405
|
return props;
|
|
7406
7406
|
}
|
|
7407
7407
|
function formatCameraPropLabel(key) {
|
|
7408
|
-
if (key === "area") return "
|
|
7409
|
-
if (key === "areaColor") return "
|
|
7408
|
+
if (key === "area") return "Zone";
|
|
7409
|
+
if (key === "areaColor") return "Zone Color";
|
|
7410
7410
|
return key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
|
|
7411
7411
|
}
|
|
7412
7412
|
var DEFAULT_CONFIG = {
|
|
@@ -58716,7 +58716,7 @@ init_index_client();
|
|
|
58716
58716
|
var root_7$4 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-amber-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#92400e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
58717
58717
|
var root_8$2 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-cyan-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0e7490" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="1"></rect><line x1="12" y1="4" x2="12" y2="20"></line><line x1="3" y1="12" x2="21" y2="12"></line></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
58718
58718
|
var root_6$3 = /* @__PURE__ */ from_html(`<div class="grid grid-cols-2 gap-2 mb-3"></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Windows</h3> <div class="grid grid-cols-2 gap-2"></div>`, 1);
|
|
58719
|
-
var root_1$8 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">
|
|
58719
|
+
var root_1$8 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Zone</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><rect x="4" y="6" width="16" height="12" rx="1"></rect></svg> Rect</button> <button type="button" title="Click to place triangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M12 4 L20 19 L4 19 Z"></path></svg> Triangle</button> <button type="button" title="Click points; click first point or Enter to close"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg> Polygon</button></div> <p class="text-[10px] text-gray-400 mb-2 px-0.5"><!></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
|
|
58720
58720
|
var root_10$2 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-blue-300 hover:bg-blue-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-gray-50 flex items-center justify-center text-2xl font-mono"> </div> <span class="text-xs font-medium text-gray-600"> </span></button>`);
|
|
58721
58721
|
var root_11$2 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-green-300 hover:bg-green-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-green-50 flex items-center justify-center text-lg"><!></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
58722
58722
|
var root_9$2 = /* @__PURE__ */ from_html(`<div class="space-y-2"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Presets</h3> <p class="text-xs text-gray-400 mb-3">Click to add a room shape to the canvas</p> <div class="grid grid-cols-2 gap-2"></div> <hr class="my-3 border-gray-200"/> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Templates</h3> <p class="text-xs text-gray-400 mb-3">Pre-furnished rooms — walls + furniture in one click</p> <div class="grid grid-cols-2 gap-2"></div></div>`);
|
|
@@ -59079,7 +59079,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
59079
59079
|
var p_1 = sibling(div_6, 2);
|
|
59080
59080
|
var node_1 = child(p_1);
|
|
59081
59081
|
var consequent = ($$anchor) => {
|
|
59082
|
-
append($$anchor, text$1("Drag to draw · name/color from camera
|
|
59082
|
+
append($$anchor, text$1("Drag to draw · name/color from camera area / areaColor"));
|
|
59083
59083
|
};
|
|
59084
59084
|
var consequent_1 = ($$anchor) => {
|
|
59085
59085
|
append($$anchor, text$1("Click to place · then drag vertices"));
|
|
@@ -59088,7 +59088,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
59088
59088
|
append($$anchor, text$1("Click vertices · Enter / click first point to close"));
|
|
59089
59089
|
};
|
|
59090
59090
|
var alternate = ($$anchor) => {
|
|
59091
|
-
append($$anchor, text$1("Select a camera first, then draw its
|
|
59091
|
+
append($$anchor, text$1("Select a camera first, then draw its Zone"));
|
|
59092
59092
|
};
|
|
59093
59093
|
if_block(node_1, ($$render) => {
|
|
59094
59094
|
if (get(currentTool) === "zone" && get(currentZoneShape) === "rectangle") $$render(consequent);
|
|
@@ -60033,7 +60033,7 @@ var root_26 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-
|
|
|
60033
60033
|
var root_24 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-gray-200 rounded flex items-center justify-center text-xs">🏛️</span> Column Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Shape</span> <div class="flex gap-2"><button>⭕ Round</button> <button>⬜ Square</button></div></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="10" max="200" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="50" max="1000" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div><span class="text-xs text-gray-500 mb-1.5 block">Color</span> <div class="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <!></div>`, 1);
|
|
60034
60034
|
var root_28 = /* @__PURE__ */ from_html(`<div class="text-xs text-gray-500">Camera: <span class="text-gray-700 font-mono"> </span></div>`);
|
|
60035
60035
|
var root_29 = /* @__PURE__ */ from_html(`<button type="button"></button>`);
|
|
60036
|
-
var root_27 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 rounded flex items-center justify-center text-xs">⬡</span>
|
|
60036
|
+
var root_27 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 rounded flex items-center justify-center text-xs">⬡</span> Zone</h3> <label class="block"><span class="text-xs text-gray-500">Name</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm" title="From assignedCameras.area when linked"/></label> <!> <div class="text-xs text-gray-500">Shape: <span class="text-gray-700 capitalize"> </span></div> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex flex-wrap gap-1.5 mt-1"><!> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></label> <label class="block"><span class="text-xs text-gray-500">Fill opacity</span> <input type="range" min="0" max="0.4" step="0.02" class="w-full"/></label></div>`);
|
|
60037
60037
|
var root_30 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-emerald-100 rounded flex items-center justify-center text-xs">🏷️</span> Text Annotation</h3> <label class="block"><span class="text-xs text-gray-500">Text</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Font Size</span> <input type="number" min="8" max="72" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex items-center gap-2"><input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/> <span class="text-xs text-gray-400"> </span></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (°)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">X</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Y</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`);
|
|
60038
60038
|
var root_31 = /* @__PURE__ */ from_html(`<div class="mt-4 pt-3 border-t border-gray-200"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-blue-100 rounded flex items-center justify-center text-xs">🖼️</span> Background Image</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Opacity</span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Scale</span> <input type="range" min="0.1" max="5" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Rotation</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-2"><button> </button> <button class="flex-1 px-2 py-1.5 border rounded text-sm border-gray-200 hover:bg-gray-50">📏 Set Scale</button></div> <button class="w-full px-2 py-1.5 border border-red-300 rounded text-sm text-red-600 hover:bg-red-50">Remove Image</button></div></div>`);
|
|
60039
60039
|
var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel="" style="top: 0; bottom: 0;"><!> <!></div>`);
|
|
@@ -61839,7 +61839,7 @@ function LayersPanel($$anchor, $$props) {
|
|
|
61839
61839
|
});
|
|
61840
61840
|
if ((_$$get$zones = get(floor).zones) === null || _$$get$zones === void 0 ? void 0 : _$$get$zones.length) cats.push({
|
|
61841
61841
|
key: "zones",
|
|
61842
|
-
label: "
|
|
61842
|
+
label: "Zones",
|
|
61843
61843
|
icon: "⬡",
|
|
61844
61844
|
items: get(floor).zones.map((z) => ({
|
|
61845
61845
|
id: z.id,
|
|
@@ -66100,7 +66100,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
66100
66100
|
const step = get(currentSnapToGrid) ? get(currentGridSize) : SNAP;
|
|
66101
66101
|
return Math.round(v / step) * step;
|
|
66102
66102
|
}
|
|
66103
|
-
/** Pick camera for new
|
|
66103
|
+
/** Pick camera for new Zone: selected camera, else first camera without a zone. */
|
|
66104
66104
|
function resolveAreaCameraTarget() {
|
|
66105
66105
|
var _$$get$zones, _ref, _$$get$furniture$find;
|
|
66106
66106
|
if (!get(currentFloor)) return null;
|
|
@@ -66125,7 +66125,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
66125
66125
|
});
|
|
66126
66126
|
}
|
|
66127
66127
|
return addZone(shape, points, {
|
|
66128
|
-
name: `
|
|
66128
|
+
name: `Zone ${idx + 1}`,
|
|
66129
66129
|
color: nextZoneColor(idx)
|
|
66130
66130
|
});
|
|
66131
66131
|
}
|
|
@@ -67461,6 +67461,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67461
67461
|
const zoneSel = (_$$get7 = get(selectedZoneId)) !== null && _$$get7 !== void 0 ? _$$get7 : floor.zones.some((z) => z.id === get(currentSelectedId)) ? get(currentSelectedId) : null;
|
|
67462
67462
|
drawZones(getCS(), floor, zoneSel);
|
|
67463
67463
|
}
|
|
67464
|
+
if (get(showFurniture)) for (const fi of floor.furniture) drawFurniture(fi, isSelected(fi.id));
|
|
67464
67465
|
if (get(currentTool) === "zone") {
|
|
67465
67466
|
var _floor$zones$length, _floor$zones2, _floor$zones$length2, _floor$zones3;
|
|
67466
67467
|
const draftCam = resolveAreaCameraTarget();
|
|
@@ -67917,27 +67918,29 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67917
67918
|
return;
|
|
67918
67919
|
}
|
|
67919
67920
|
if (tool === "select" && ((_$$get8 = get(currentFloor)) === null || _$$get8 === void 0 || (_$$get8 = _$$get8.zones) === null || _$$get8 === void 0 ? void 0 : _$$get8.length) && get(layerVis).zones) {
|
|
67920
|
-
|
|
67921
|
-
|
|
67922
|
-
|
|
67923
|
-
|
|
67924
|
-
|
|
67925
|
-
|
|
67926
|
-
|
|
67927
|
-
|
|
67928
|
-
|
|
67929
|
-
|
|
67930
|
-
|
|
67931
|
-
|
|
67932
|
-
|
|
67933
|
-
|
|
67934
|
-
|
|
67935
|
-
|
|
67936
|
-
|
|
67937
|
-
|
|
67938
|
-
|
|
67921
|
+
if (!(get(showFurniture) && !!findFurnitureAt$1(wp) || get(layerVis).columns && !!findColumnAt$1(wp) || get(showStairs) && !!findStairAt$1(wp))) {
|
|
67922
|
+
const zHit = findZoneAt(wp, get(currentFloor).zones, get(zoom));
|
|
67923
|
+
if (zHit) {
|
|
67924
|
+
set(selectedZoneId, zHit.id, true);
|
|
67925
|
+
selectedElementId.set(zHit.id);
|
|
67926
|
+
set(selectedTextAnnotationId, null);
|
|
67927
|
+
set(selectedAnnotationId, null);
|
|
67928
|
+
set(selectedMeasurementId, null);
|
|
67929
|
+
const vIdx = findZoneVertexAt(wp, zHit, get(zoom));
|
|
67930
|
+
beginUndoGroup();
|
|
67931
|
+
if (vIdx >= 0) {
|
|
67932
|
+
set(draggingZoneId, zHit.id, true);
|
|
67933
|
+
set(draggingZoneVertex, vIdx, true);
|
|
67934
|
+
} else {
|
|
67935
|
+
set(draggingZoneId, zHit.id, true);
|
|
67936
|
+
set(draggingZoneVertex, null);
|
|
67937
|
+
set(zoneDragLast, {
|
|
67938
|
+
x: wp.x,
|
|
67939
|
+
y: wp.y
|
|
67940
|
+
}, true);
|
|
67941
|
+
}
|
|
67942
|
+
return;
|
|
67939
67943
|
}
|
|
67940
|
-
return;
|
|
67941
67944
|
}
|
|
67942
67945
|
set(selectedZoneId, null);
|
|
67943
67946
|
}
|
|
@@ -69670,7 +69673,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69670
69673
|
["furniture", "Furniture"],
|
|
69671
69674
|
["stairs", "Stairs"],
|
|
69672
69675
|
["columns", "Columns"],
|
|
69673
|
-
["zones", "
|
|
69676
|
+
["zones", "Zones"],
|
|
69674
69677
|
["guides", "Guides"],
|
|
69675
69678
|
["measurements", "Measurements"]
|
|
69676
69679
|
], index$1, ($$anchor, $$item) => {
|