moveable icon indicating copy to clipboard operation
moveable copied to clipboard

ControlBox of selected SVG element has wrong position after scrolling

Open PetrToman opened this issue 2 years ago • 1 comments

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.

obrazek

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).

PetrToman avatar Jan 21 '24 15:01 PetrToman

Same issue

xggaxlc avatar Apr 18 '25 05:04 xggaxlc