Comments (3)
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.
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.
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)
- Handle touch events HOT 3
- Nodes are hidden by/go below panels when zooming out HOT 1
- Remove dependency on dagre package HOT 1
- Please update documentation how to use diagram-maker with React 18 HOT 1
- Fix deploy docs action
- Drag multiple nodes HOT 4
- Copy/paste nodes and edges HOT 4
- Auto align HOT 4
- Document Browser Support HOT 2
- Error when React component is unmounted HOT 12
- Is it possible to add custom number of Connectors for Nodes? HOT 9
- Diagram Maker cannot handle large number of nodes in canvas. HOT 4
- Documentation on local dev environment setup HOT 4
- It would be great to have nested functionality HOT 4
- How do i make diagram-maker only render inside the dom node i am passing and not occupy all screen HOT 1
- Amazing project
- Expose event filter to be customized HOT 2
- Trigger an action when hovering edges HOT 3
- [Vue warn]: Error in beforeDestroy hook: "TypeError: _this.props.destroyCallback is not a function" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diagram-maker.