door_models 5.3.3 → 5.3.5
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 +12 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1893,7 +1893,8 @@ function DoorLeaf(_ref8) {
|
|
|
1893
1893
|
doorWidth,
|
|
1894
1894
|
doorHeight,
|
|
1895
1895
|
theDoorDepth,
|
|
1896
|
-
doorOpening
|
|
1896
|
+
doorOpening,
|
|
1897
|
+
doorName
|
|
1897
1898
|
} = door;
|
|
1898
1899
|
const {
|
|
1899
1900
|
frameDepth,
|
|
@@ -1908,10 +1909,19 @@ function DoorLeaf(_ref8) {
|
|
|
1908
1909
|
} = doorFrame;
|
|
1909
1910
|
const initialDoorHeight = useRef(null);
|
|
1910
1911
|
useEffect(() => {
|
|
1911
|
-
|
|
1912
|
+
initialDoorHeight.current = null;
|
|
1913
|
+
}, [doorName]);
|
|
1914
|
+
useEffect(() => {
|
|
1915
|
+
if (initialDoorHeight.current === null && doorHeight > 0) {
|
|
1912
1916
|
initialDoorHeight.current = doorHeight;
|
|
1913
1917
|
}
|
|
1914
1918
|
}, [doorHeight]);
|
|
1919
|
+
useMemo(() => {
|
|
1920
|
+
if (initialDoorHeight.current === null) {
|
|
1921
|
+
return 0;
|
|
1922
|
+
}
|
|
1923
|
+
return (doorHeight - initialDoorHeight.current) / 2 / 1000;
|
|
1924
|
+
}, [doorHeight]);
|
|
1915
1925
|
const {
|
|
1916
1926
|
x1: occulusX1,
|
|
1917
1927
|
x2: occulusX2,
|