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

Expose svgPanZoom as component property

pavelhoral opened this issue · comments

Recent versions are not exposing svgPanZoom instance in a way that previous version did (not sure which change caused this). Being able to work with svgPanZoom is very helpful when rendering additional stuff inside the graph.

It is possible to workaround this by capturing svgPanZoom instance in view.onSvgPanZoomInitialized configuration, but that is quite ugly approach.

Would it be possible to add svgPanZoom in defineExpose and make it official API?

If you are interested in what I am doing with your library - https://prekladyher.github.io/disco-website/#/conversations/5?entryId=25 . You can open the "minimap" by clicking the map icon and you will see that I am showing viewport windows for the big graph there - to calculate the window position I need svgPanZoom of both the main graph and minimap.

Didn't notice I can get what I need from getViewBox() instance method.