@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 CHANGED
@@ -3499,14 +3499,15 @@ const getPlacementContext = (node, ancestorHint) => {
3499
3499
  };
3500
3500
  };
3501
3501
  const toLocalRect = (rect, placementContext) => {
3502
- if (placementContext.transformedAncestor == null) {
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 - placementContext.boundsLeft) / placementContext.scaleX,
3507
- y: (rect.y - placementContext.boundsTop) / placementContext.scaleY,
3508
- width: rect.width / placementContext.scaleX,
3509
- height: rect.height / placementContext.scaleY
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nectary/components",
3
- "version": "5.45.3",
3
+ "version": "5.45.4",
4
4
  "files": [
5
5
  "**/*/*.css",
6
6
  "**/*/*.json",
@@ -62,14 +62,15 @@ const getPlacementContext = (node, ancestorHint) => {
62
62
  };
63
63
  };
64
64
  const toLocalRect = (rect, placementContext) => {
65
- if (placementContext.transformedAncestor == null) {
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 - placementContext.boundsLeft) / placementContext.scaleX,
70
- y: (rect.y - placementContext.boundsTop) / placementContext.scaleY,
71
- width: rect.width / placementContext.scaleX,
72
- height: rect.height / placementContext.scaleY
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 {