ajainarayanan / react-dag

This is a base implementation of wrapping jsplumb with react to be more usable in a react based environment
MIT License
159 stars 39 forks source link

How can we customise DagNode Component ? #6

Closed kartikag01 closed 7 years ago

kartikag01 commented 8 years ago

i want to make custom Node in Dag how can i do that?

ajainarayanan commented 8 years ago

@KARTIK01 Today you can't do that. I have not gotten to a point where a usecase warranted it.

Could you provide more information on how you want to customize your Node? Today we have all options to target a Node based on class and have hooks to control the interaction with a Node (click events for example). Do you have something else as part of your usecase that you want to control? Some more information of what you want to achieve would help me see how we can enable customization of Node.

kartikag01 commented 8 years ago

hello @ajainarayanan , I want to make ui changes in Node, want to add some buttons in Node and more views and also to change style of node

ajainarayanan commented 8 years ago

@KARTIK01 Don't have the ability to add custom views for Node today. Having the ability to add custom buttons/views to the node is not a small change and I don't think I will be able to work on that in the near future. You can customize the styling though. You can override the styling using css.

ajainarayanan commented 7 years ago

@KARTIK01 Super long time after updating this thread. Just got time to work on this. Have added a new property to dag component (renderNode) that basically accepts a function to render custom nodes. I still need to get an example but the idea is to have the renderNode called for each node. This way people using the component can render their own nodes.

Note:

ajainarayanan commented 7 years ago

@KARTIK01 Closing this issue. Please feel free to reopen if you are still not able to customize the node in your usecase.