question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

moveable-control-box misplaced when used with svg g elements(Safari)

See original GitHub issue

Environments

  • Framework name: React
  • Framework version:17.0.2
  • Moveable Component version: react-moveable 0.32.3
  • Testable Address: Minimal CodeSandbox

Description

When using the Moveable component with a SVGGElement as target, the control box is not at the right position (origin at the top left of the svg). The element g is positioned with a transform="translate(x y)". The behavior is the one expected with Chrome as well as with Firefox, not on Safari.

Safari

Capture d’écran 2022-04-22 à 16 13 26

Chrome

Capture d’écran 2022-04-22 à 16 14 03

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
daybrushcommented, May 2, 2022

@IIIvan37 It was my transform calculation mistake.

Try 0.32.8-beta.1 version. Thank you 😃

1reaction
daybrushcommented, Apr 26, 2022

@IIIvan37

  • lit-moveable 0.6.4
  • moveable 0.29.4
  • preact-moveable 0.31.4
  • react-compat-moveable 0.17.4
  • react-moveable 0.32.4
  • svelte-moveable 0.21.4
  • vue-moveable 2.0.0-beta.11
  • vue3-moveable 0.4.4
  • ngx-moveable 0.26.4

moveable’s new version is released. Check it again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

moveable-control-box misplaced when used with SVG elements
I'm working with SVG elements (the dimension of the ViewBox is the same of the svg element). The position of the surrounded rectangle...
Read more >
Here's How I Solved a Weird Bug Using Tried and True ...
At first, this looks like a CSS issue. Some styles might be applied on a hover event that breaks the layout or the...
Read more >
How to place and center text in an SVG rectangle
An easy solution to center text horizontally and vertically in SVG: Set the position of the text to the absolute center of the...
Read more >
Draggable SVG elements - Peter Collingridge
A step-by-step guide to making SVG elements draggable. ... Dragging the mouse, when we need to move the element.
Read more >
Safari Technology Preview Release Notes - Apple Developer
Added support for editing @-rules in the Styles sidebar of the Elements tab ... Fixed SVG textPath rendering when a text element is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found