door_models 5.1.7 → 5.1.9
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/index.cjs.js +16 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1548,6 +1548,7 @@ function DoorModels(_ref7) {
|
|
|
1548
1548
|
const totalFrameHeightM = totalOpeningHeightM + topFrameWidthM;
|
|
1549
1549
|
|
|
1550
1550
|
// --- Centering Logic ---
|
|
1551
|
+
(initialDoorHeight.current || doorHeight) / 1000;
|
|
1551
1552
|
const yCenteringOffset = -topFrameWidthM / 2;
|
|
1552
1553
|
const sideFrameCenterY = topFrameWidthM / 2;
|
|
1553
1554
|
const interiorFanlightYPosition = totalOpeningHeightM / 2 - interiorFanlightHeightM / 2;
|
|
@@ -1576,7 +1577,12 @@ function DoorModels(_ref7) {
|
|
|
1576
1577
|
|
|
1577
1578
|
// --- HINGE VISIBILITY LOGIC ---
|
|
1578
1579
|
const isGlassDoor = React.useMemo(() => ["SG8", "SG10", "SG12"].includes(bodyType), [bodyType]);
|
|
1579
|
-
const pivotNewPosition = (
|
|
1580
|
+
const pivotNewPosition = React.useMemo(() => {
|
|
1581
|
+
if (initialDoorHeight.current === null || initialDoorHeight.current === 0) {
|
|
1582
|
+
return 0;
|
|
1583
|
+
}
|
|
1584
|
+
return (doorHeight - initialDoorHeight.current) / 2 / 1000;
|
|
1585
|
+
}, [doorHeight]);
|
|
1580
1586
|
|
|
1581
1587
|
// Calculate evenly spaced hinge positions
|
|
1582
1588
|
React.useMemo(() => {
|
|
@@ -1629,9 +1635,6 @@ function DoorModels(_ref7) {
|
|
|
1629
1635
|
x: 0
|
|
1630
1636
|
}];
|
|
1631
1637
|
}, [isDoubleDoor, doorWidthM, doorPivot]);
|
|
1632
|
-
if (cpid !== doorName) {
|
|
1633
|
-
return null;
|
|
1634
|
-
}
|
|
1635
1638
|
if (is2D) {
|
|
1636
1639
|
return /*#__PURE__*/jsxRuntime.jsx("group", {
|
|
1637
1640
|
"position-y": yCenteringOffset + 0.1,
|
|
@@ -1646,7 +1649,9 @@ function DoorModels(_ref7) {
|
|
|
1646
1649
|
});
|
|
1647
1650
|
}
|
|
1648
1651
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1649
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("
|
|
1652
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("gridHelper", {
|
|
1653
|
+
args: [10, 10]
|
|
1654
|
+
}), /*#__PURE__*/jsxRuntime.jsx("axesHelper", {
|
|
1650
1655
|
args: [3]
|
|
1651
1656
|
}), /*#__PURE__*/jsxRuntime.jsx("gridHelper", {
|
|
1652
1657
|
args: [10, 10]
|
|
@@ -2059,12 +2064,17 @@ function DoorLeaf(_ref8) {
|
|
|
2059
2064
|
secondDoorStopDepth,
|
|
2060
2065
|
secondDoorStopOffset
|
|
2061
2066
|
} = doorFrame;
|
|
2062
|
-
React.useRef(
|
|
2067
|
+
const initialDoorHeight = React.useRef(null);
|
|
2063
2068
|
|
|
2064
2069
|
// useEffect(() => {
|
|
2065
2070
|
// initialDoorHeight.current = doorHeight;
|
|
2066
2071
|
// }, [cpid]);
|
|
2067
2072
|
|
|
2073
|
+
React.useEffect(() => {
|
|
2074
|
+
if (doorHeight > 0 && initialDoorHeight.current === null) {
|
|
2075
|
+
initialDoorHeight.current = doorHeight;
|
|
2076
|
+
}
|
|
2077
|
+
}, [doorHeight]);
|
|
2068
2078
|
const {
|
|
2069
2079
|
height: interiorFanlightHeightValue
|
|
2070
2080
|
} = interiorFanlight;
|