bpmn-io / diagram-js

A toolbox for displaying and modifying diagrams on the web.
MIT License
1.65k stars 418 forks source link

fix(popup-menu): keep given top-left position with scale #878

Closed marstamm closed 3 months ago

marstamm commented 3 months ago

This ensures the position given to the Popup menu when opening (x, y) are the real coordinates it is displayed at.

Currently, the scale origin is in the center of the container, which creates weird UI when you zoomed in to the canvas: image

With the fix, the transform is applied to the corner instead: image

nikku commented 3 months ago

Is this related to https://github.com/camunda/improved-canvas/issues/37?

marstamm commented 3 months ago

I did not have this issue on my radar. It should be the same issue.

I can't replicate the Screenshot 100%, but the issue is present in dmn-js and this fix also affects it:

image

vs.

image