floor-editor-ts 1.2.1 → 1.2.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/floor-editor.es.js
CHANGED
|
@@ -65598,20 +65598,10 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
65598
65598
|
height
|
|
65599
65599
|
};
|
|
65600
65600
|
}
|
|
65601
|
-
/** Bounds for viewOnly fit:
|
|
65601
|
+
/** Bounds for viewOnly fit: outer wall edges */
|
|
65602
65602
|
function getViewOnlyFitBounds(floor = get(currentFloor)) {
|
|
65603
|
-
|
|
65604
|
-
|
|
65605
|
-
if (!wb || !(floor === null || floor === void 0 || (_floor$walls2 = floor.walls) === null || _floor$walls2 === void 0 ? void 0 : _floor$walls2.length)) return wb;
|
|
65606
|
-
const pad = Math.max(...floor.walls.map((w) => w.thickness / 2), 8);
|
|
65607
|
-
return {
|
|
65608
|
-
minX: wb.minX - pad,
|
|
65609
|
-
minY: wb.minY - pad,
|
|
65610
|
-
maxX: wb.maxX + pad,
|
|
65611
|
-
maxY: wb.maxY + pad,
|
|
65612
|
-
width: wb.width + pad * 2,
|
|
65613
|
-
height: wb.height + pad * 2
|
|
65614
|
-
};
|
|
65603
|
+
if (!floor) return null;
|
|
65604
|
+
return getFloorBounds(floor, { includeWallThickness: true });
|
|
65615
65605
|
}
|
|
65616
65606
|
function getCanvasFrameStyle() {
|
|
65617
65607
|
return "width: 100%; height: 100%";
|