fix anoying bug with absolute resize making components jump around

This commit is contained in:
Luis Landeiro Ribeiro
2026-03-01 22:58:55 +00:00
parent 3c68274baf
commit 0cc04b7a6f
4 changed files with 7 additions and 4 deletions

2
dist/grapes.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

5
dist/grapes.mjs vendored
View File

@@ -55379,8 +55379,11 @@ var Resizer = /** @class */ (function () {
return parentRect; return parentRect;
var offsetParent = el.offsetParent; var offsetParent = el.offsetParent;
// Check if the parent or any ancestor has `position: relative`, `absolute`, `fixed`, or `sticky` // Check if the parent or any ancestor has `position: relative`, `absolute`, `fixed`, or `sticky`
// Use avoidFrameZoom and avoidFrameOffset to match the coordinate system used for startDim
// (set in start() with the same flags), so that the subtraction in calc() produces correct
// relative positions for CSS top/left in absolute mode.
if (offsetParent && offsetParent.tagName !== 'BODY') { if (offsetParent && offsetParent.tagName !== 'BODY') {
parentRect = this.getElementPos(offsetParent); parentRect = this.getElementPos(offsetParent, { avoidFrameZoom: true, avoidFrameOffset: true });
} }
return parentRect; return parentRect;
}; };

2
dist/grapes.mjs.map vendored

File diff suppressed because one or more lines are too long