Comments (3)
Hi, the first thing I'd try is to create a new class that extends BaseConnection
and overrides the DrawLineGeometry
and DrawDefaultArrowhead
methods. The new properties you mentioned would go into this new class (this can be done without having access to the source code). Having them in the BaseConnection
implies that all the existing connection types should be updated to work with these new properties.
I also added support for vertical connections in Nodify itself in this PR: #99 . I wonder what would be the effort to allow a horizontal port to flow into a vertical one like you did and if I can support your use case better through class inheritance and virtual methods (note that I added the orientation as a parameter to each Draw*Arrowhead
virtual method).
Also, it's worth mentioning that you are not limited to using BaseConnection
. You can create your own connection types in C# or directly in XAML.
from nodify.
thanks for the reply, yes i pretty much came to the same conclusion and decided to extend the baseconnection. As written in the PR i can contribute the mixed vertical<->horizontal flow. (The decision of orientation i have on the view model ports (to e.g. Input.Orientation
and Output.Orientation
, bound through xaml so as you did with the dependy property orientation). Thanks for the confirmation and feature integation ill submit some extension in your PR on monday.
from nodify.
I experimented a bit and it seems to require an extension of two properties on the BaseConnection, IsTargetVertical
and IsSourceVertical
, as well as Vertical
property on the Ports. The flow/direction then does not need extension, however the arrow-drawing and line-drawing ones do (additional parameters). The offset is rotated by switching x/y in case the port is vertical.
Looks promising, i adjusted the default bezier one in a way where a horizontal port can flow into a vertical one and so one.
Let me know if this sounds useful maybe i have a chance todo a PR or if you'd do it differently.
from nodify.
Related Issues (20)
- [Question] Sorting the graph HOT 3
- I want to hide Pending Connection content until it's hover to invalid connection, How can I? HOT 6
- [Bug]Triggered Background of connectors bindings HOT 1
- How can I use strings as input / output types on nodes?[Question] HOT 1
- [Question]Can display text on the connection? HOT 2
- [Question] Problem about Revit-Nodify-Cooperation-Experiment HOT 2
- [Question] Drag&Drop from Toolbox HOT 5
- [Question] How do you change the theme during runtime? HOT 2
- [Application] Avalonia refactoring version HOT 4
- [Question] Draggable arrowheads, is it possible? HOT 2
- [Feature] Fit selected nodes into view HOT 1
- [Bug] set FlowDirection property of Node, the connection of this Node will not update HOT 4
- [Question] How to make the line above the node HOT 1
- [Question] Is there a setting for auto layout? HOT 1
- [Docs] Dead links in contributing doc HOT 1
- [Feature] Copy/Paste and Undo/Redo editor actions HOT 2
- [Question] Map panning to left mouse button HOT 5
- [Question] Is it possible to draw connections ontop the GroupingNode BG, but still behind normal Nodes? HOT 6
- [Docs] HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodify.