ls1intum / Apollon

UML Modeling Editor written in React
https://apollon-library.readthedocs.io
MIT License
65 stars 22 forks source link

`Development`: Fix issue with multiple connectors being created #256

Closed minrows closed 2 years ago

minrows commented 2 years ago

Checklist

Motivation and Context

This PR fixes the creation of multiple connectors while more than one element is selected.

Description

Multiple connectors were created when multiple elements (multiple sources) were selected. Now, this PR fixes that behavior and creates only one connection (from a single source).

Steps for Testing

In local machine:

  1. Clone a repo.
  2. Switch to bugfix/multiple-connections-fix branch.
  3. Start the application by executing yarn install followed by yarn start command.
  4. Insert three elements in the canvas.
  5. Select two elements by clicking on elements while pressing shift key.
  6. Try to connect one element from one of two selected elements to the third unselected element.
  7. Observe that only single connection is being drawn instead of multiple.

In test server

  1. Goto test server
  2. Insert three elements in the canvas.
  3. Select two elements by clicking on elements while pressing shift key.
  4. Try to connect one element from one of two selected elements to the third unselected element.
  5. Observe that only single connection is being drawn instead of multiple.

Screenshots

Before:

screen-capture (16)

After:

screen-capture (15)

Additional Info

Changes released in 2.11.4-alpha.0