@nectary/components 5.45.3 → 5.45.4
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/bundle.js +6 -5
- package/package.json +1 -1
- package/utils/placement.js +6 -5
package/bundle.js
CHANGED
|
@@ -3499,14 +3499,15 @@ const getPlacementContext = (node, ancestorHint) => {
|
|
|
3499
3499
|
};
|
|
3500
3500
|
};
|
|
3501
3501
|
const toLocalRect = (rect, placementContext) => {
|
|
3502
|
-
|
|
3502
|
+
const { transformedAncestor, boundsLeft, boundsTop, scaleX, scaleY } = placementContext;
|
|
3503
|
+
if (transformedAncestor == null) {
|
|
3503
3504
|
return rect;
|
|
3504
3505
|
}
|
|
3505
3506
|
return {
|
|
3506
|
-
x: (rect.x -
|
|
3507
|
-
y: (rect.y -
|
|
3508
|
-
width: rect.width /
|
|
3509
|
-
height: rect.height /
|
|
3507
|
+
x: (rect.x - boundsLeft) / scaleX + transformedAncestor.scrollLeft,
|
|
3508
|
+
y: (rect.y - boundsTop) / scaleY + transformedAncestor.scrollTop,
|
|
3509
|
+
width: rect.width / scaleX,
|
|
3510
|
+
height: rect.height / scaleY
|
|
3510
3511
|
};
|
|
3511
3512
|
};
|
|
3512
3513
|
const orientationValues$2 = [
|
package/package.json
CHANGED
package/utils/placement.js
CHANGED
|
@@ -62,14 +62,15 @@ const getPlacementContext = (node, ancestorHint) => {
|
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
const toLocalRect = (rect, placementContext) => {
|
|
65
|
-
|
|
65
|
+
const { transformedAncestor, boundsLeft, boundsTop, scaleX, scaleY } = placementContext;
|
|
66
|
+
if (transformedAncestor == null) {
|
|
66
67
|
return rect;
|
|
67
68
|
}
|
|
68
69
|
return {
|
|
69
|
-
x: (rect.x -
|
|
70
|
-
y: (rect.y -
|
|
71
|
-
width: rect.width /
|
|
72
|
-
height: rect.height /
|
|
70
|
+
x: (rect.x - boundsLeft) / scaleX + transformedAncestor.scrollLeft,
|
|
71
|
+
y: (rect.y - boundsTop) / scaleY + transformedAncestor.scrollTop,
|
|
72
|
+
width: rect.width / scaleX,
|
|
73
|
+
height: rect.height / scaleY
|
|
73
74
|
};
|
|
74
75
|
};
|
|
75
76
|
export {
|