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.

Rotation origin changes when `resizable` depends on a state

See original GitHub issue

Environments

  • Framework name: React
  • Framework version: 16.12.0
  • Moveable Component version: 0.16.6

Description

If the resizable property is made to be dependent on a React state field, whenever resizable changes (from true to false) the rotation origin (which is usually at the center) changes to become at the top left corner.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
VitDev17commented, Feb 2, 2020

To solve this problem maybe you could calculate the centre of the object and then set it as local storage so it is never influenced by the app current state.

0reactions
wassghacommented, Feb 2, 2020

Fixed in 0.17.0!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rotated shape is moving on y-axis when resizing shape width
I'm trying to resize a rotated shape on canvas. My problem is that when I call the rendering function, the shape starts "drifting"...
Read more >
8.10.4 Rotating, Resizing, Stretching and Skewing 3D Graphs
Origin allows you to stretch a 3D graph along the X, Y, or Z axis. First, click the white space of the graph...
Read more >
rotate() - CSS: Cascading Style Sheets - MDN Web Docs
The rotate() CSS function defines a transformation that rotates an element around a fixed point on the 2D plane, without deforming it.
Read more >
Transform objects in InDesign - Adobe Support
For example, when you rotate an image, what gets rotated depends ... Resizing is simply changing the Width and Height values of an...
Read more >
Clear & Apply — Blender Manual
Applying transform values essentially resets the values of object's location, rotation or scale, while visually keeping the object data in-place. The object ...
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