Code Monkey home page Code Monkey logo

Comments (2)

jpb12 avatar jpb12 commented on August 20, 2024

Changed proptype of pathFunc from string to func. It was complaining about receiving the wrong prop when I passed a function but worked fine.

Can you raise a PR for this and we'll release v4.1.1 with this fix? (So as not to require users updating to the breaking changes suggested below)

I also passed "wrappedTextProps" as the last prop to the text element, that way I can overwrite the default dx and dy props given to it.

Technically a breaking change, although I can't imagine anyone is leaving those props and relying on them being overwritten. Still, I'd suggest batching this with the main change for safety since I'm going to suggest modifications that will make it a breaking change anyway.

I created a fork where I've create a "rect" boolean prop (which will then be checked and render a rect rather than a circle) and "rectProps" used rather than circleProps.

I think it would be better if this was implemented more generically like:
shape: PropTypes.oneOf(['circle', 'rect', 'polygon']) with a default value of circle.
I'm not convinced on shape as the name of the prop though. nodeShape?

Then there would be a single prop replacing circleProps for this shape. Obviously, this is a breaking change so this would be release v5.0.0.

from react-tree-graph.

josh-stevens avatar josh-stevens commented on August 20, 2024

That makes a lot of sense, I'll see about making those changes this week or next week.

from react-tree-graph.

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.