@aptre/flex-layout 0.1.4 → 0.1.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.mjs +5 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3154,7 +3154,7 @@ var BorderButton = (props) => {
|
|
|
3154
3154
|
const updateRect = () => {
|
|
3155
3155
|
const layoutRect = layout.getDomRect();
|
|
3156
3156
|
const r = selfRef.current?.getBoundingClientRect();
|
|
3157
|
-
if (r) {
|
|
3157
|
+
if (r && layoutRect) {
|
|
3158
3158
|
node._setTabRect(
|
|
3159
3159
|
new Rect(
|
|
3160
3160
|
r.left - layoutRect.left,
|
|
@@ -3837,6 +3837,9 @@ var Splitter = (props) => {
|
|
|
3837
3837
|
};
|
|
3838
3838
|
const onDragMove = (event) => {
|
|
3839
3839
|
const clientRect = layout.getDomRect();
|
|
3840
|
+
if (!clientRect) {
|
|
3841
|
+
return;
|
|
3842
|
+
}
|
|
3840
3843
|
const pos = {
|
|
3841
3844
|
x: event.clientX - clientRect.left,
|
|
3842
3845
|
y: event.clientY - clientRect.top
|
|
@@ -4116,7 +4119,7 @@ var TabButton = (props) => {
|
|
|
4116
4119
|
const updateRect = () => {
|
|
4117
4120
|
const layoutRect = layout.getDomRect();
|
|
4118
4121
|
const r = selfRef.current?.getBoundingClientRect();
|
|
4119
|
-
if (r) {
|
|
4122
|
+
if (r && layoutRect) {
|
|
4120
4123
|
node._setTabRect(
|
|
4121
4124
|
new Rect(
|
|
4122
4125
|
r.left - layoutRect.left,
|