dash14 / v-network-graph

An interactive network graph visualization component for Vue 3

Home Page:https://dash14.github.io/v-network-graph/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potentially unnecessary rendering

zamplyy opened this issue · comments

Hi!
Thanks for a great library. Really shows you've put in alot of work!

I am trying to get more performance for my app when using force-layout, and trying a few ways of doing that.
I found that we're always rendering the VEdgeBackgrounds and wondering if we can somehow conditionally render them instead.
And what do is the functionality provided by them, i couldn't find a example.

Hi @zamplyy,
Thank you so much for your consideration of performance improvement!

The purpose of VEdgeBackgrounds is to address the fact that when edges are drawn as dashed lines, browser mouse events only respond to the drawn part and not to the non-drawn part. VEdgeBackgrounds are transparent solid lines that are responsible for catching mouse events.
Therefore, VEdgeBackgrounds need not be present on the DOM, at least if the line style of the edge is solid....

Clear and concise answer. A pleasure to see such support :)