@mpxjs/webpack-plugin 2.10.7-beta.1 → 2.10.7-beta.3
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.
|
@@ -533,19 +533,8 @@ export const useLayout = ({ props, hasSelfPercent, setWidth, setHeight, onLayout
|
|
|
533
533
|
}
|
|
534
534
|
if (enableOffset) {
|
|
535
535
|
nodeRef.current?.measure((x, y, width, height, offsetLeft, offsetTop) => {
|
|
536
|
-
const {
|
|
537
|
-
layoutRef.current = {
|
|
538
|
-
x,
|
|
539
|
-
y: y - navigationY,
|
|
540
|
-
width,
|
|
541
|
-
height,
|
|
542
|
-
offsetLeft,
|
|
543
|
-
offsetTop: offsetTop - navigationY,
|
|
544
|
-
_x: x,
|
|
545
|
-
_y: y,
|
|
546
|
-
_offsetLeft: offsetLeft,
|
|
547
|
-
_offsetTop: offsetTop
|
|
548
|
-
};
|
|
536
|
+
const { top: navigationY = 0 } = navigation?.layout || {};
|
|
537
|
+
layoutRef.current = { x, y: y - navigationY, width, height, offsetLeft, offsetTop: offsetTop - navigationY };
|
|
549
538
|
});
|
|
550
539
|
}
|
|
551
540
|
onLayout && onLayout(e);
|
|
@@ -617,19 +617,8 @@ export const useLayout = ({ props, hasSelfPercent, setWidth, setHeight, onLayout
|
|
|
617
617
|
}
|
|
618
618
|
if (enableOffset) {
|
|
619
619
|
nodeRef.current?.measure((x: number, y: number, width: number, height: number, offsetLeft: number, offsetTop: number) => {
|
|
620
|
-
const {
|
|
621
|
-
layoutRef.current = {
|
|
622
|
-
x,
|
|
623
|
-
y: y - navigationY,
|
|
624
|
-
width,
|
|
625
|
-
height,
|
|
626
|
-
offsetLeft,
|
|
627
|
-
offsetTop: offsetTop - navigationY,
|
|
628
|
-
_x: x,
|
|
629
|
-
_y: y,
|
|
630
|
-
_offsetLeft: offsetLeft,
|
|
631
|
-
_offsetTop: offsetTop
|
|
632
|
-
}
|
|
620
|
+
const { top: navigationY = 0 } = navigation?.layout || {}
|
|
621
|
+
layoutRef.current = { x, y: y - navigationY, width, height, offsetLeft, offsetTop: offsetTop - navigationY }
|
|
633
622
|
})
|
|
634
623
|
}
|
|
635
624
|
onLayout && onLayout(e)
|