Giter Site home page Giter Site logo

Comments (8)

gaoryrt avatar gaoryrt commented on July 21, 2024 1

So efficient, thank you!

from beautiful-skill-tree.

andrico1234 avatar andrico1234 commented on July 21, 2024

Interesting! Thanks for bringing this up! does translate(-105%) work for all use cases, or just your specific width?

It looks like this issue is the same as this one: #62

Regardless, I'll see what I can come up with after doing some digging

Can you share a repo that I can fork to view this issue, or create a codesandbox?

Also, I like the look of this skill tree! Can't wait to see it when it's done.

from beautiful-skill-tree.

gaoryrt avatar gaoryrt commented on July 21, 2024

Seems the extra percents in translate(-105%) is made for adjusting the horizontal line, but why 5% instead of 3%?

I think I can reproduce this error in any case, the more children a node have, the larger gap it shows.

You can find the repo here.

from beautiful-skill-tree.

andrico1234 avatar andrico1234 commented on July 21, 2024

I think i've found the fix. Instead of manually changing the width, I simply flip the element over using scale(-1) and add a translateX(-3px) to offset the center of the vertical line it connects to.

This works for nodes with long widths.

I'll see if this fixes the issue you're having when there are lots of children.

from beautiful-skill-tree.

andrico1234 avatar andrico1234 commented on July 21, 2024

It looks like this change also fixes your tree!

I copied the structure within the test app!

image

from beautiful-skill-tree.

andrico1234 avatar andrico1234 commented on July 21, 2024

Fixed in: #69

from beautiful-skill-tree.

andrico1234 avatar andrico1234 commented on July 21, 2024

Released with 1.6.2

from beautiful-skill-tree.

andrico1234 avatar andrico1234 commented on July 21, 2024

Let me know if your tree makes it live, and I can add it to the showcase 😁

from beautiful-skill-tree.

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.