mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-02 02:54:43 +00:00
Merge pull request #2128 from asturur/pointer-in-scrollable
fix getScrollLeftTop
This commit is contained in:
commit
2d2712c784
1 changed files with 1 additions and 7 deletions
|
|
@ -121,13 +121,7 @@
|
|||
firstFixedAncestor = element;
|
||||
}
|
||||
|
||||
if (element.nodeType === 1 &&
|
||||
origElement !== upperCanvasEl &&
|
||||
fabric.util.getElementStyle(element, 'position') === 'absolute') {
|
||||
left = 0;
|
||||
top = 0;
|
||||
}
|
||||
else if (element === fabric.document) {
|
||||
if (element === fabric.document) {
|
||||
left = body.scrollLeft || docElement.scrollLeft || 0;
|
||||
top = body.scrollTop || docElement.scrollTop || 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue