fix anoying bug with absolute resize making components jump around
This commit is contained in:
2
dist/grapes.min.js
vendored
2
dist/grapes.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/grapes.min.js.map
vendored
2
dist/grapes.min.js.map
vendored
File diff suppressed because one or more lines are too long
5
dist/grapes.mjs
vendored
5
dist/grapes.mjs
vendored
@@ -55379,8 +55379,11 @@ var Resizer = /** @class */ (function () {
|
||||
return parentRect;
|
||||
var offsetParent = el.offsetParent;
|
||||
// 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') {
|
||||
parentRect = this.getElementPos(offsetParent);
|
||||
parentRect = this.getElementPos(offsetParent, { avoidFrameZoom: true, avoidFrameOffset: true });
|
||||
}
|
||||
return parentRect;
|
||||
};
|
||||
|
||||
2
dist/grapes.mjs.map
vendored
2
dist/grapes.mjs.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user