Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation preview improvements #36

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Creation preview improvements #36

merged 2 commits into from
Nov 2, 2023

Conversation

hlxid
Copy link
Collaborator

@hlxid hlxid commented Nov 2, 2023

  • Fix temporary element cleanup when canceling a creation.
    This is important for the edge creator. Previously the creation was cancelled by undoing the last action which is the element insertion. However for edges this may not be the case as the viewport can be moved around which also is a command and would be undone instead of the insertion. To fix this the element now is only inserted using the AddElementToGraphAction when the creation is finalized.
  • Only insert the preview edge into the diagram once the source has been determined. Previously it was inserted with the enablement of the edge creation tool. But because the source and target are unset in this situation sprotty can't render it and will show a ? at the diagram origin. Now it is only inserted once the source is known and the temporary target element is inserted

@hlxid hlxid merged commit 605411b into main Nov 2, 2023
1 check passed
@hlxid hlxid deleted the creation-preview-imporvements branch November 2, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant