Blazor-Diagrams / Blazor.Diagrams

A fully customizable and extensible all-purpose diagrams library for Blazor
https://blazor-diagrams.zhaytam.com
MIT License
919 stars 176 forks source link

Identify if I'm zooming with the wheel or using SetZoom #299

Open elgransan opened 1 year ago

elgransan commented 1 year ago

Hi, I need to capture the zoom event only when the user spins the wheel but no when I set the zoom manually through SetZoom, the event is firing in both cases. I figure out unsubscribing and resubscribing again to the event, but exists a better way?

        Diagram.ZoomChanged -= HandleZoom;
        Diagram.SetZoom(zoom);
        Diagram.ZoomChanged += HandleZoom;