Git Product home page Git Product logo

Comments (5)

anseki avatar anseki commented on June 3, 2024

Hi @zakk616, thank you for the comment.
You have to specify {startSocket: 'bottom', endSocket: 'top'} to the line, because nobody knows where is a problem and nobody knows a correct line for you.

from leader-line.

zakk616 avatar zakk616 commented on June 3, 2024

Hi @zakk616, thank you for the comment. You have to specify {startSocket: 'bottom', endSocket: 'top'} to the line, because nobody knows where is a problem and nobody knows a correct line for you.

actually these cards are being produced dynamically and the screen size is also responsive, I can not specify {startSocket: 'bottom', endSocket: 'top'} but {startSocket: 'auto', endSocket: 'auto'} so the line should be drawn and redirected automaticaly.

{startSocket: 'bottom', endSocket: 'top'} works fine when on desktop and mobile screen.
Desktop Screen:
image

Mobile Screen:
image

but when cards are shown on medium screens the line direction does not work properly.

from leader-line.

anseki avatar anseki commented on June 3, 2024

Sorry, we don't know what the "properly" mean for you.
You can get coordinates of elements easily by using e.g. getBoundingClientRect, to choose a socket that you want.

from leader-line.

zakk616 avatar zakk616 commented on June 3, 2024

to provide startSocket endSocket dynamicaly when the page resizes, one needs to implement getBoundingClientRect to grab new position of the element first and then draw the line on new position and provide startSocket endSocket.

from leader-line.

anseki avatar anseki commented on June 3, 2024

Yes. πŸ˜„

from leader-line.

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.