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
The controls should move along with the bounding box/object when viewport is panned.
Actual Behavior
The controls do not move with the bounding box when the viewport transforms are changed (in this case viewport is scrolled/panned).
I allow panning in my app and this issue happens when i do. In this example i have set up vertical panning with scroll. The controls's default color and settings have also been changed so they are more clearly seen (and also to replicate how it looks in my app). Although changing these settings does not affect this bug.
Error Message & Stack Trace
The text was updated successfully, but these errors were encountered:
I have actually done the exact same thing in my app, however 2 things were causing discrepancies:
The docs do not consider if the user is using manual rendering mode, which i think is my bad for forgetting it but also a warning would be nice. I should try working on the docs a bit. What this essentially means is i need to call after the setViewportTransform:
canvas.requestRenderAll()
Following the tutorial should technically only fix the control's position AFTER mouse:up. This is where the expensive part comes in. You need to call canvas.setViewportTransform + canvas.requestRenderAll(). This will ensure the control's position changes correctly even while the "dragging/panning" is currently in process and hasn't ended yet.
CheckList
Version
6.0.2
In What environments are you experiencing the problem?
No response
Node Version (if applicable)
None
Link To Reproduction
https://codesandbox.io/p/devbox/fabric-nextjs-sandbox-forked-5hhs5t?workspaceId=ws_DrBw2XRMwTM7BRr64FWCik
Steps To Reproduce
Expected Behavior
The controls should move along with the bounding box/object when viewport is panned.
Actual Behavior
The controls do not move with the bounding box when the viewport transforms are changed (in this case viewport is scrolled/panned).
I allow panning in my app and this issue happens when i do. In this example i have set up vertical panning with scroll. The controls's default color and settings have also been changed so they are more clearly seen (and also to replicate how it looks in my app). Although changing these settings does not affect this bug.
Error Message & Stack Trace
The text was updated successfully, but these errors were encountered: