Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

[Question] Display more than the name #254

Closed
ghost opened this issue Dec 10, 2020 · 1 comment
Closed

[Question] Display more than the name #254

ghost opened this issue Dec 10, 2020 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Dec 10, 2020

Is there a ways to display more attributes in a tool tip, or on a sub-line ?
Ex :
{
"name": "app.js",
"active": true,
"attributes" : { key1 : "aaa", key2:"bbb"}
}
With the labels aaa et bbb displayed under the "app.js"

@ghost ghost added the bug label Dec 10, 2020
@ghost
Copy link
Author

ghost commented Dec 21, 2020

Find a way with creating a NodeLabel class and refering into render:
 nodeLabelComponent={{
                                    render: <NodeLabel className='myLabelComponentInSvg' />,
                                    foreignObjectWrapper: {
                                    y: -22
                                    }
                                }}/> 

and

export class NodeLabel extends React.PureComponent {
render() {
const { className, nodeData } = this.props;
return (


{nodeData.attributes.Type+':'}

{nodeData.name}

)
}
}

@ghost ghost closed this as completed Dec 21, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

0 participants