anvaka / panzoom

Universal pan and zoom library (DOM, SVG, Custom)

Home Page:https://anvaka.github.io/panzoom/demo/attach-via-script.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple panzoom?

xsshello opened this issue · comments

Hello, how can I make multiple svgs?

Now I do it like this:

	let paths = document.querySelectorAll('div svg')
	paths.forEach((elem) => {
		instance.elem = panzoom(elem, {
			minZoom: 1
		});
	});

but have problem with catch events, I don't know how to refer to them - instance[0].getTransform(); not working

or better is to do one panzoom and switch them via destroy it somehow?