frank-flow icon indicating copy to clipboard operation
frank-flow copied to clipboard

Panzoom should only work on canvas, not the containing div

Open philipsens opened this issue 3 years ago • 2 comments

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:

  1. Drag outside of canvas or try to center a small canvas

Expected behavior Center of canvas

Screenshots image

Additional context The arrows are also being dragged and zoomed, maybe they should float like the action buttons.

philipsens avatar Dec 01 '21 13:12 philipsens

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.

philipsens avatar Jan 21 '22 13:01 philipsens

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.

philipsens avatar Jan 21 '22 13:01 philipsens