frank-flow
frank-flow copied to clipboard
Panzoom should only work on canvas, not the containing div
Describe the bug Panzoom center function doesn't work because it centers the whole div where the canvas is located in.
Reporter @philipsens
Category
- Flow
To Reproduce Steps to reproduce the behavior:
- Drag outside of canvas or try to center a small canvas
Expected behavior Center of canvas
Screenshots
Additional context The arrows are also being dragged and zoomed, maybe they should float like the action buttons.
So I found out that this functionality actually work pretty good. If you go to Editor mode (effectively destroying the component) and then switch to Hybrid or Flow mode, it will actually center well. The problem revolves around it being initialized wrong, and not detecting the change in parent container size when switching between Hybrid and Flow mode.
Jaco suggested removing the center button. This would prevent weird behavior that the user doesn't expect.
We could do this, but it would remain an issue for the #468 feature. This would be a temporary fix, but it might be a welcome one.