Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotatabe doesn't work as expected, and origin is in the wrong place #894

Open
flokiowl opened this issue Apr 17, 2023 · 5 comments
Open
Labels
bug Something isn't working complete question Further information is requested
Milestone

Comments

@flokiowl
Copy link

flokiowl commented Apr 17, 2023

Environments

  • Framework name: Vue
  • Framework version: 3.2.47
  • Moveable Component version: 0.20.0
  • Testable Address(optional):

Description

Thanks for your great work! Can't figure it out in one thing, could you tell me what might be wrong here? What information can I provide for details?

c12fb34c-d8c0-4a0e-8a9f-47693d239ed2.mp4
@flokiowl
Copy link
Author

onRotateStart() { e.setFixedDirection([0, 0]) }

this code helped with rotate, but not with origin

@daybrush daybrush added the question Further information is requested label Apr 18, 2023
@daybrush
Copy link
Owner

@flokiowl

Maybe it's an svg element?
To see it as a video, it is judged as an svg element.
svg origin is (0, 0) of <svg>.

If your video is svg then setFixedDirection will be fixed later.

@daybrush daybrush added the bug Something isn't working label Apr 18, 2023
@flokiowl
Copy link
Author

Yep, you are right, it is SVG. Thanks for quick response)

@daybrush daybrush added this to the 0.47.0 milestone Apr 22, 2023
daybrush added a commit that referenced this issue Apr 28, 2023
@daybrush
Copy link
Owner

daybrush commented May 1, 2023

@flokiowl

  • croact-moveable 0.3.0
  • @moveable/helper 0.1.2
  • lit-moveable 0.24.0
  • moveable 0.47.0
  • preact-moveable 0.49.0
  • react-moveable 0.50.0
  • svelte-moveable 0.39.0
  • vue-moveable 2.0.0-beta.66
  • vue3-moveable 0.22.0
  • ngx-moveable 0.44.0

moveable's new version is released.

svgOrigin prop is added.

If you want to set it separately in svg, try setting svgOrigin to "50% 50%".

@jiangjiyun
Copy link

svgOrigin to "50% 30%" is not work。 @daybrush
it is work as '50% 50%'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working complete question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants