BlazorPanzoom icon indicating copy to clipboard operation
BlazorPanzoom copied to clipboard

Disable BlazorPanzoom in Blazor event

Open PmE8HW0KRfqa opened this issue 11 months ago • 1 comments

How can I enable/disable BlazorPanzoom (completely or only the wheelmouse events) in a Blazor onclick event?

I've tried

_panzoom.WheelMode = WheelMode.None;

** DO STUFF HERE

_panzoom.WheelMode = WheelMode.ZoomWithWheel;

But this has no effect.

PmE8HW0KRfqa avatar Mar 09 '24 23:03 PmE8HW0KRfqa

Hi, Have you solved this problem? I met similar issue. I need to get mousedown event to drawing box in canvas but seems blocked by panzoom element. My situation is :

<Panzoom @ref="_panzoomSrc_markup" WheelMode="WheelMode.ZoomWithWheel" > <div @ref="@context.ElementReference"> <Canvas @ref="srcCanvas_markup" id="opencvCanvas_markup" width="@imgWidth" height="@imgHeight" onmousemove="@HandleMouseMove" onmousedown="@HandleMouseDown" onmouseup="@HandleMouseUp">

        Your browser does not support the HTML5 canvas tag.
    </Canvas>
</div>

It seems the canvas can't do the mousedown event which is blocked by panzoom I guess. Is there way to swtich to annotation mode to select a bounding box for a note in the canvas image?

albertliu63 avatar Apr 08 '24 10:04 albertliu63