jacomyal / sigma.js

A JavaScript library aimed at visualizing graphs of thousands of nodes and edges
https://www.sigmajs.org
MIT License
11.22k stars 1.59k forks source link

Dynamic background image to move with graph #1369

Closed jackfrost1411 closed 1 year ago

jackfrost1411 commented 1 year ago

How to do the following?: It mostly depends if you need it to move in sync with the graph camera or not. If you don't, simple html/css should suffice. If you need it to move, sigma.js does not provide this option per se but the renderer has a beforeRender & afterRender event you can listen to to make this work.

Originally posted by @Yomguithereal in https://github.com/jacomyal/sigma.js/issues/1333#issuecomment-1356315147

jacomyal commented 1 year ago

The example clusters-labels (demo, sources) shows you all you need to synchronize a custom layer of your own with a sigma camera.

The example shows an SVG layer that is above all sigma layers, but you can put in behind using CSS for instance.

jackfrost1411 commented 1 year ago

I don't see a SVG layer in the link that you provided. Is it the right one?

On Mon, Jul 24, 2023 at 8:35 AM Alexis Jacomy @.***> wrote:

The example clusters-labels (demo https://www.sigmajs.org/examples/clusters-labels/, sources https://github.com/jacomyal/sigma.js/tree/main/examples/clusters-labels) shows you all you need to synchronize a custom layer of your own with a sigma camera.

The example shows an SVG layer that is above all sigma layers, but you can put in behind using CSS for instance.

— Reply to this email directly, view it on GitHub https://github.com/jacomyal/sigma.js/issues/1369#issuecomment-1648150811, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALUAQ2EXAH7DYRJKHRYBA2DXR2I3RANCNFSM6AAAAAA2JQP2CE . You are receiving this because you authored the thread.Message ID: @.***>