-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Fix wrong connector position for knot nodes when using step connection #112
Conversation
This partly fixes the handling for steps, but not for backwards going connections (it still is doing the looping, while in such cases it best just switch the sides of the knot). I think in general the knot doesnt need to have a orientation but more should have like some logic to handle based on relative position to source/target connectors, where connector should ingest the connection without doing such unneeded steeps curves or or crossings. Step connection knot handling however now at least working well (when not considering those backward facing connections): And i just checked, the Orientation for knot nodes i take from the outgoing connector atm, that way i avoid having to have any orientation on nodes or knots. |
Ok.. now I understand what you mean with the backward-going connections. It would be ideal to have something like this, but I believe it is hard to implement and probably needs a new parameter added to BaseConnection since we don't have node information inside connections: Notice the wire flip at the end of the gif. I think it's based on node positions, rather than connectors, because it does not happen when I move the knot node unless it's considering only the start connector and end connectors, ignoring the knot connector. For normal connection flows it's behaving the same (which would break if I changed direction based on connector position):
I wouldn't really want to try implementing this, at least for the moment, because I consider the current behavior to be sufficient for most use cases. And anyway, the library does not restrict connections to the ones provided. Creating custom connections is as simple as this: <nodify:NodifyEditor.ConnectionTemplate>
<Line X1="{Binding Input.Anchor.X}"
Y1="{Binding Input.Anchor.Y}"
X2="{Binding Output.Anchor.X}"
Y2="{Binding Output.Anchor.Y}"
Stroke="DodgerBlue"
StrokeThickness="2" />
</nodify:NodifyEditor.ConnectionTemplate> However, if you have time to invest in this, I'd be more than happy to review your PR. |
Yeah definitly based on positions of source+target node/connector, not of orientations of either. |
* Fixed knot node binding errors in playground app * Add new built-in connection type: StepConnection (#109) * Fix BaseConnection SplitEvent and DisconnectEvent not being raised if the corresponding command is null * Fixed DecoratorContainer scaling with zoom when not referencing a theme in App.xaml * Fixed wrong connector position for knot nodes when using step connection (#112) * Sync documentation to wiki * Update sync-docs.yml * add chinese wiki docs (#114) * [Example] Add shapes drawing example application (#115) * Add new example application * Disable editing controls when the canvas is locked * Draw shapes by click and drag * Add ResizablePanel to resize shapes * Update README.md Add canvas app example * NodifyObservableCollection: Avoid copying the list of items if there are no subscribers to removed or cleared events * Bump version for release --------- Co-authored-by: enheng? <48354002+WYihei@users.noreply.github.com>
* Release mouse capture on connector cancel due to KeyUp event * Update CHANGELOG.md * Bump version for release * Port to Avalonia * Fix warnings * Update README.md Add link to Avalonia port * Fix: Zooming into nested editors should not zoom the parent editors * Fix: Cancelling a pending connection via a hot key will no longer throw an exception * Fix: Exceptions in UnscaleTransformConverter and UnscaleDoubleConverter * Fix: Cannot use marquee selection and pan at the same time * Fix: fixed selection clear on items collection reset * Fix: Cannot use marquee selection inside comment nodes * 5.2.0.1 release * Reorder DataTemplates in calculator demo for easier Avalonia merges * Fix: The selection rectangle stops updating when the cursor is outside the window * Added BaseConnection.Orientation to allow vertical connections * Updated changelog * Fix: Mimic WPF's mouse capture behavior * fix small spelling error in recently added dependency property * split source/target orientation * better control point if different orientations * slight clarification in changelog * Updated changelong * Added directional arrows * Fixed spelling issue * Caluclate bezier connection tangent * Added vertical nodes in playground app * Minor adjustments * Merge fix * Update Avalonia to 11.1.0-beta2 * Allow changing editor gestures at runtime (miroiu#104) Separated selection gestures for ItemContainer and GroupingNode from the NodifyEditor Added new gesture types: AnyGesture, AllGestures, and NodifyGesture Fixed a bug where the item container would incorrectly transition to the dragging state on mouse over * Added Orientation to NodeInput and NodeOutput (miroiu#105) * Added Orientation dependency property to NodeInput and NodeOutput * Added the ability to animate directional arrows on connections (miroiu#106) * Added DirectionalArrowsOffset dependency property to BaseConnection Added StartAnimation and StopAnimation methods to BaseConnection * Added Toggle connections animation button in playground app * Prepare for release * Allow changing editor gestures at runtime (miroiu#104) Separated selection gestures for ItemContainer and GroupingNode from the NodifyEditor Added new gesture types: AnyGesture, AllGestures, and NodifyGesture Fixed a bug where the item container would incorrectly transition to the dragging state on mouse over * Added Orientation to NodeInput and NodeOutput (miroiu#105) * Added Orientation dependency property to NodeInput and NodeOutput * Added the ability to animate directional arrows on connections (miroiu#106) * Added DirectionalArrowsOffset dependency property to BaseConnection Added StartAnimation and StopAnimation methods to BaseConnection * Added Toggle connections animation button in playground app * Prepare for release * Post-merge fixes * Update readme * Fixed knot node binding errors in playground app * fix bug can not access editor command (#17) * fix bug can not access editor command --------- Co-authored-by: Bartosz Korczynski <b.andysc@gmail.com> * Fix: Can't resize grouping nodes * Fix: Sticky Connections * Fix: Don't open context menu when panning * Add new built-in connection type: StepConnection (miroiu#109) * Fix BaseConnection SplitEvent and DisconnectEvent not being raised if the corresponding command is null * Fixed DecoratorContainer scaling with zoom when not referencing a theme in App.xaml * Fixed wrong connector position for knot nodes when using step connection (miroiu#112) * Sync documentation to wiki * Update sync-docs.yml * add chinese wiki docs (miroiu#114) * Merge conflicts fix * [Example] Add shapes drawing example application (miroiu#115) * Add new example application * Disable editing controls when the canvas is locked * Draw shapes by click and drag * Add ResizablePanel to resize shapes * Update README.md Add canvas app example * NodifyObservableCollection: Avoid copying the list of items if there are no subscribers to removed or cleared events * Bump version for release * Update FAQ.md * Improved Node customizability * Added DataContext to ItemsSelectStartedCommand, ItemsSelectCompletedCommand, ItemsDragStartedCommand and ItemsDragCompletedCommand * Fix containers at (0, 0) being selected when double clicking on the canvas * Update changelog * Update Connections-Overview.md * Resolve merge conflicts * Upgrade to Avalonia 11.1 * Fix CI * Add a Minimap control to Nodify (miroiu#124) * Added a Minimap control to Nodify * Add MaxViewportOffset and Zoom event * Add ResizeToViewport * Add playground settings * Add IsReadOnly to minimap to allow disabling controls * Add documentation * Bump version for release * Increase minimap colors contrast * Resolve WPF merge conflicts * Build fix * Added a link to a live, browser demo * Update the getting started section miroiu#125 * Update README.md Fix image link for Shapes app * Add CuttingLine control to Nodify (miroiu#127) * Added CuttingLine control to Nodify * Bump version for release * Update api reference * Update README.md (#19) Spent far too long going in circles with this one... 😄 * Add OutlineBrush and OutlineThickness to BaseConnection (miroiu#133) Fixes miroiu#131 * Add IsAnimatingDirectionaArrows and DirectionalArrowsAnimationDuration dependency properties to BaseConnection (miroiu#135) * Add the ability to select connections (miroiu#139) * Add multi-select and support for custom connections * Added CanSelectMultipleItems to NodifyEditor * Added settings search box to playground app * Fix Calculator context manu and converter issues. * Update Avalonia version to 11.1.4 * Fix Calculator context menu * Add support for ScrollViewer (miroiu#142) * Implement IScrollInfo * Bump version for release * Merge commit 'efa15e00e859d4f756e87e8743994693844d759e' into avalonia_port * Add support for ScrollViewer --------- Co-authored-by: Emanuel Miroiu <miroiu.emanuel@gmail.com> Co-authored-by: Hendrik Polczynski <hendrik.polczynski@siemens.com> Co-authored-by: phamviethuy <42407610+phamviethuy@users.noreply.github.com> Co-authored-by: enheng? <48354002+WYihei@users.noreply.github.com> Co-authored-by: ArronDavies <arronadaarro@aol.co.uk> Co-authored-by: Mario Pintaric <mario@noemata.org>
📝 Description of the Change
Closes #110
🐛 Possible Drawbacks
No.