Coder Social home page Coder Social logo

Comments (3)

boweihan avatar boweihan commented on May 14, 2024

Hi @jolivaSan - see https://awslabs.github.io/diagram-maker/usage/declarative.html#customizing-the-node-connectors for customizing your own nodes. Depending on how you're using the library you should be able to either create your own custom node component or directly override CSS classes.

from diagram-maker.

jolivaSan avatar jolivaSan commented on May 14, 2024

Hi @boweihan,

thanks for you answer, that exactly what im using :-) let me reformulate the question, apart from data-id is there any other attribute that i could use to pass custom information and be received by the render of the potential node and also the node?

Best Regards.

from diagram-maker.

dpportet avatar dpportet commented on May 14, 2024

Hi @jolivaSan,

I think you'll want to utilize the typeId field when defining the node config and then use that field in the render callback.

Taking a look at one of the examples, you can see typeId being defined for each node in the config data: https://github.com/awslabs/diagram-maker/blob/master/integ/BoundaryCircular/data.ts#L16.

That typeId is then used in the render callback to render different nodes based on the type provided: https://github.com/awslabs/diagram-maker/blob/master/integ/BoundaryCircular/render.ts#L43.

Let us know if that works for you.

from diagram-maker.

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.