Git Product home page Git Product logo

Comments (3)

miroiu avatar miroiu commented on June 1, 2024 1

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.

hendrikp avatar hendrikp commented on June 1, 2024 1

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.

hendrikp avatar hendrikp commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.