Giter Club home page Giter Club logo

Comments (6)

panthernet avatar panthernet commented on July 20, 2024

Hello, thanks for report. This scenarion wasn't the expected one :) I don't see much sense in assigning the same connetion point to surce and target. I'm in for not allowing to do so, will it be correct for your case?

from graphx.

galakt avatar galakt commented on July 20, 2024

My main goal is prevent showing alone arrow (in [0;0] point) when source and target points are equal (that can happen accidentally after manual graph generation and sometimes after dragging).
It is not cool, but now for a while i just added:

        if (p1 == p2)
        {
            p1.X = double.PositiveInfinity;
            p1.Y = double.PositiveInfinity;
            p2.X = double.PositiveInfinity;
            p2.Y = double.PositiveInfinity;
        }
        SourceConnectionPoint = p1;
        TargetConnectionPoint = p2;

from graphx.

panthernet avatar panthernet commented on July 20, 2024

I've checked how it works and it looks like self looped edge. If you have an edge where source and target vertices are the same then the self looped edge indicator will be drawn in the top left corner of the vertex. On the other side the code execution should not pass to the place you'd made the fix in if it is the self looped edge we talk about. Unless you'd changed something in original logic. Originally edge can't have equal source and target connection points.

from graphx.

galakt avatar galakt commented on July 20, 2024

I have made sample to show what i mean:
https://github.com/galakt/GraphXSample2

from graphx.

panthernet avatar panthernet commented on July 20, 2024

Thanks for the sample, unfortunately i'm quite busy right now. Can't promise much but will try to spare some time on the issue.

from graphx.

panthernet avatar panthernet commented on July 20, 2024

Fixed! That was an intersting case where vertices were so close together that edge were almost zero length making rotation calc return NaN value messing up the final pointer position. Also i've implemented the EdgeControlBase::HideEdgePointerOnVertexOverlap property which allows you to hide edge pointer in such cases (default) or display them at the edge pos if set to false.

from graphx.

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.