refactor: consolidate navigation features into a single module#3316
Merged
Conversation
Previously, navigation functionality was spread across multiple classes: - `GraphConfigurator` for panning - `BpmnGraph` for mxGraph overrides (zoom and fit methods) and mouse event handling - `Navigation` for zoom and fit API This refactoring: - Centralizes all navigation-related code in one module - Establishes clearer responsibilities using composition over inheritance - Improves code organization and readability - Paves the way for future extensibility (e.g., plugin system or extension points) `BpmnVisualization` only exposed the `Navigation` type for its navigation property. `Navigation` is now an interface instead of a class, with no impact on usage. Users were not supposed to rely on the previous class implementation.
|
♻️ PR Preview 5b65484 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
|
♻️ PR Preview 5b65484 has been successfully destroyed since this PR has been closed. 🤖 By surge-preview |
tbouffard
commented
Apr 10, 2025
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Previously, navigation functionality was spread across multiple classes:
GraphConfiguratorfor panningBpmnGraphfor mxGraph overrides (zoom and fit methods) and mouse event handlingNavigationfor zoom and fit APIThis refactoring:
BpmnVisualizationonly exposed theNavigationtype for its navigation property.Navigationis now an interface instead of a class, with no impact on usage. Users were not supposed to rely on theprevious class implementation.
Notes
This should help to implement #848
As a reminder, #2671 moved all the code to BpmnGraph which increased a lot the responsibility of this class.