react-sigma icon indicating copy to clipboard operation
react-sigma copied to clipboard

How to disable the camera from moving on mousedown?

Open bryandandan opened this issue 5 years ago • 1 comments

Hello,

Is there a way to programmatically disable the camera from moving when we click and move the canvas? I'm writing a plugin similar to https://github.com/Yomguithereal/sigma-experiments/blob/master/selection-tool/index.js but for canvas 2d instead. I would like something like camera.disable()

Thanks

bryandandan avatar Nov 09 '20 14:11 bryandandan

You could write custom component to get access to the sigma instance, which would allow you to perform any operation you can perform on sigma itself. There is example in the doc which should give idea https://github.com/dunnock/react-sigma#extending-sigma-components

dunnock avatar Nov 09 '20 15:11 dunnock