feat(connector): add jumpDirection option to jumpover connector#5058
Open
ylcr003 wants to merge 2 commits into
Open
feat(connector): add jumpDirection option to jumpover connector#5058ylcr003 wants to merge 2 commits into
ylcr003 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a jumpDirection option to the jumpover connector, allowing users to specify whether jump arcs should be applied to horizontal, vertical, or both types of lines. The update includes the core logic implementation, a new demonstration page in the examples, and unit tests. Feedback points out a bug in the deduplication logic that could prevent arcs from appearing when using specific direction settings and suggests correcting the UI description in the example to accurately reflect that the later-drawn edge produces the jump arc.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Author
|
实际遇到了这样的业务场景,所以提个PR,给广大牛马提供一点帮助和便捷 |
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.
📝 Description
Add a new
jumpDirectionoption to thejumpoverconnector to control which line orientation produces the jump arc at intersections.'both'(default) — existing behavior, unchanged'horizontal'— only horizontal lines jump over crossing vertical lines'vertical'— only vertical lines jump over crossing horizontal lines🖼️ Screenshot
jumpDirection: 'both'(default)jumpDirection: 'horizontal'💡 Motivation and Context
In some business scenarios (e.g. orthogonal routing graphs), it is visually cleaner to always have horizontal lines jump over vertical lines, rather than letting the arc appear on whichever line was drawn later (index-based). This option gives users explicit control over which line direction is responsible for the jump arc.
New API: