Hello! I want to make a panzoom in qwik and stumbled across this library: https://github.com/timmywil/panzoom
The problem: I need to register it with the element.
So i will probably have something like this, right?:
export default component$(() => {
const panzoom = useSignal(Panzoom(elem, { maxScale: 5 })); // here
return (
<>
<div
onWheel$={panzoom.value.zoomWithWheel}
// ...
>
<h1>Content in draggable and zoomable box</h1>
</div>
</>
);
});
But where i marked // here comes the problem: How can i get a reference to the dom element at that position? Or at all? 😅
Or is there a better library (maybe made for qwik, couldnt found one)