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

refactor: directly override shape.createSvgCanvas #3043

Merged

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Feb 22, 2024

Previously, this was done by modifying the shape prototype.
The new implementation limits side effects on application that use mxGraph directly, and don't modify code we don't own.

Testing

The change is validated by integration tests that check that the bpmn-id and the CSS classes in the DOM are correctly
set on both shapes/edges and labels.
This is also validated with the elements-identification.html demo. The CSS class is correctly applied to the label.

@tbouffard tbouffard added depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first refactoring Code refactoring labels Feb 22, 2024
Previously, this was done by modifying the shape prototype.
The new implementation limits side effects on application that use mxGraph directly, and don't modify code we don't own.

The change is validated by integration tests that check that the bpmn-id and the CSS classes in the DOM are correctly
set on both shapes/edges and labels.
This is also validated with the elements-identification.html demo. The CSS class is correctly applied to the label.
@tbouffard tbouffard force-pushed the refactor/no_shape.createSvgCanvas_prototype_override branch from 4559246 to fd9a1ec Compare March 1, 2024 10:50
@tbouffard tbouffard removed the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

♻️ PR Preview fd9a1ec has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

Copy link

github-actions bot commented Mar 1, 2024

♻️ PR Preview fd9a1ec has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

Copy link

sonarcloud bot commented Mar 1, 2024

@tbouffard tbouffard marked this pull request as ready for review March 1, 2024 11:07
@tbouffard tbouffard merged commit 776e500 into master Mar 1, 2024
24 checks passed
@tbouffard tbouffard deleted the refactor/no_shape.createSvgCanvas_prototype_override branch March 1, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants