homotopy-io / homotopy-webclient

https://homotopy.io
26 stars 5 forks source link

SVG panning #2

Open jamievicary opened 5 years ago

jamievicary commented 5 years ago

Thanks for implementing this. The main issue with it is that it conflicts with the left-click-and-drag mechanic for contractions and expansions. The best fix would be to only allow panning via right-click-and-drag

jamievicary commented 5 years ago

I had to disable this as it was causing issues with the braiding masks. The problem is that to get masks to work properly, you need to set a viewBox on the SVG, and match this with the x, y, width and height attributes on the mask. But the svg-pan-zoom library removes the viewBox.

I spent about a day trying to get around this before giving up in frustration. If anyone thinks they can solve it, go for it.