You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an app with undo/ redo. Upon undo/ redo, the component's stylings (height, width etc) and frame (transform, rotate) are all updated. The Moveable component is saved in a ref variable (accessed via moveable.current) that is set to null, and after the primary component has been updated (and is re-rendered), the Moveable component is assigned a value again with the updated target.
However, as you can see, the frame is not updated. I noticed updateRect() and updateTarget() as methods. If I wanted refresh the moveable control box, do I use those? If so, how do I access them when I'm using Moveable as a component?
Thank you for this incredible project!
The text was updated successfully, but these errors were encountered:
Hi, I am new to React. I addd some dependencies to useEffect(() => {setTarget(...)}. When the dependencies are changed, React re-renders the <Moveable> automatically. I guess this is better than updating moveable box manually by calling updateRect().
Environments
Description
I have an app with undo/ redo. Upon undo/ redo, the component's stylings (height, width etc) and frame (transform, rotate) are all updated. The Moveable component is saved in a ref variable (accessed via
moveable.current
) that is set to null, and after the primary component has been updated (and is re-rendered), the Moveable component is assigned a value again with the updated target.However, as you can see, the frame is not updated. I noticed
updateRect()
andupdateTarget()
as methods. If I wanted refresh the moveable control box, do I use those? If so, how do I access them when I'm using Moveable as a component?Thank you for this incredible project!
The text was updated successfully, but these errors were encountered: