Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linkThreeObject seem to be created new obj every tick #675

Open
longlp-sosene opened this issue Apr 2, 2024 · 0 comments
Open

linkThreeObject seem to be created new obj every tick #675

longlp-sosene opened this issue Apr 2, 2024 · 0 comments

Comments

@longlp-sosene
Copy link

longlp-sosene commented Apr 2, 2024

Is your feature request related to a problem? Please describe.

function handleCreateTextNode() { Graph.nodeThreeObject(node => { console.log('Create text node ...!'); const nodeEl = document.createElement('div'); return new CSS2DObject(nodeEl); }) Graph.linkThreeObject(link => { if(link.relationship_type !== '') { console.log('Create link label'); const nodeEl = document.createElement('div'); return new CSS2DObject(nodeEl); } }) }

It's the same with nodeThreeObject but every time hover a Node and call updateHighlight , the linkThreeObject is recall.

function updateHighlight() { // trigger update of highlighted objects in scene Graph .nodeColor(Graph.nodeColor()) .linkWidth(Graph.linkWidth()) .linkColor(Graph.linkColor()) }

if remove linkWidth & .linkColor it will not recall but can not high light the hover node.
Describe the solution you'd like

  • Only call for the first time when Graph is fetching data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant