feat: add a story to demonstrate all Perimeter features - #317
Merged
Conversation
Demonstrate the effect of all available perimeters on various shapes and what happens when no perimeter is configured. Migrate existing Perimeter history to TypeScript. It also stops modifying the GraphView prototype, extending the class instead. This avoids side effects in other stories (as they run in a Single-Page application). This story is still not fully working: the perimeter doesn't apply to the label until the shape is rendered another time (by moving it for example). This worked in the mxGraph example and should be later investigate.
tbouffard
commented
Feb 7, 2024
tbouffard
added a commit
that referenced
this pull request
Feb 8, 2024
#318) In the default vertex style configuration, declare the perimeter using the key stored in the `StyleRegistry` instead of the actual perimeter function. This reduces code coupling and will also improve tree-shaking in the future for people who don't want to rely on this perimeter implementation. The "perimeter" configuration was the only one to use an actual implementation, which makes things more consistent. ### Notes Tested with the existing stories and the new story introduced in #317
tbouffard
commented
Feb 8, 2024
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.
Demonstrate the effect of all available perimeters on various shapes and what happens when no perimeter is configured.
Migrate existing Perimeter story to TypeScript.
It also stops modifying the GraphView prototype, extending the class instead. This avoids side effects in other stories (as they run in a Single-Page application).
This story is still not fully working: the perimeter doesn't apply to the label until the shape is rendered another time (by moving it for example). This worked in the mxGraph example and should be later investigate.
The new story
The story controls let see the effect of a specific perimeter compared to the default one:
PR_317_new_story_default_and_specific_perimeter.mp4
The 1st rendering issue with the existing story
Perimeter_on_label_bounds_not_updated_on_load.mp4