moveable
moveable copied to clipboard
ControlBox of selected SVG element has wrong position after scrolling
Moveable version: 0.5.3
When container is larger than the screen, after scrolling the controlBox position is:
- ok, if
<div>is used as a target, - offset by documentElement.scrollLeft/scrollTop, if
<rect>(SVG) is used as a target.
Comparison of <div> and <rect> usage: svg-position-bug.zip
Workaround
MutationObserver can be used to fix moveable.selfElement.style.transform, but it's quite a hack (perhaps there is a better way).
Same issue