Andrei486 / uml-diagram-collab

0 stars 0 forks source link

Diagram elements add to center of user's screen #131

Closed Andrei486 closed 5 months ago

Andrei486 commented 5 months ago

New elements added will be added to the diagram so their top-left corner is on the center of the diagram parts that the user can see. This element should be added to the same position on clients' ends, regardless of where they are looking. This should work regardless of the user's screen size and scroll position.

Andrei486 commented 5 months ago

Now includes a one-line fix to https://github.com/Andrei486/uml-diagram-collab/issues/124, in the ConnectorElementController. Previously a change was made so that only events on the path hitbox around the path would be handled. However, the rectangle containing the connector would still capture events, preventing them from reaching other elements. Setting https://docs.oracle.com/javafx/2/api/javafx/scene/Node.html#pickOnBoundsProperty was enough to fix this.