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.cjs.js
CHANGED
|
@@ -1920,7 +1920,8 @@ function DoorLeaf(_ref8) {
|
|
|
1920
1920
|
doorWidth,
|
|
1921
1921
|
doorHeight,
|
|
1922
1922
|
theDoorDepth,
|
|
1923
|
-
doorOpening
|
|
1923
|
+
doorOpening,
|
|
1924
|
+
doorName
|
|
1924
1925
|
} = door;
|
|
1925
1926
|
const {
|
|
1926
1927
|
frameDepth,
|
|
@@ -1935,10 +1936,19 @@ function DoorLeaf(_ref8) {
|
|
|
1935
1936
|
} = doorFrame;
|
|
1936
1937
|
const initialDoorHeight = React.useRef(null);
|
|
1937
1938
|
React.useEffect(() => {
|
|
1938
|
-
|
|
1939
|
+
initialDoorHeight.current = null;
|
|
1940
|
+
}, [doorName]);
|
|
1941
|
+
React.useEffect(() => {
|
|
1942
|
+
if (initialDoorHeight.current === null && doorHeight > 0) {
|
|
1939
1943
|
initialDoorHeight.current = doorHeight;
|
|
1940
1944
|
}
|
|
1941
1945
|
}, [doorHeight]);
|
|
1946
|
+
React.useMemo(() => {
|
|
1947
|
+
if (initialDoorHeight.current === null) {
|
|
1948
|
+
return 0;
|
|
1949
|
+
}
|
|
1950
|
+
return (doorHeight - initialDoorHeight.current) / 2 / 1000;
|
|
1951
|
+
}, [doorHeight]);
|
|
1942
1952
|
const {
|
|
1943
1953
|
x1: occulusX1,
|
|
1944
1954
|
x2: occulusX2,
|