简体   繁体   中英

no interaction with SVG

im using vivagraph to embed a svg into a div (as a background) it works fine, but vivagraph offers interaction (scroll zoom) is there anyway to remove that kind of interaction with the svg?

I tried to tie up an eventlistner to the svg and disable it through there.

Is there not an easy way to just say "dont interact with svg just scroll down"?

Thanks

When you create renderer set interactive: false that will prevent vivagraph from handling all user input:

var renderer = Viva.Graph.View.renderer(graph, {
    graphics: graphics,
    interactive: false,
    container: document.getElementById('graph-container')
});

If you want to have fine-grained control over what to allow VivaGraph, starting from version 0.7.7 you can set interactive value to be a string value, which lists enabled features. See more documentation and interactive examples here: no interaction .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM