Under Review
Last Updated: 13 Apr 2022 14:20 by ADMIN
Ryan
Created on: 06 Apr 2022 16:29
Type: Feature Request
1
Expose the mouse wheel scroll event on the Surface component

The `Surface` component, in the drawing module, has a few exposed event handlers. It exposes click, mouse enter and mouse leave. It does not expose a handler for mouse scroll wheel movement.

You can see the exposed handlers in the `SurfaceOptions` type ...

SurfaceOptions - React Drawing Component | KendoReact API (telerik.com)

Can you please expose the mouse scroll event handler?

2 comments
ADMIN
Konstantin Dikov
Posted on: 13 Apr 2022 14:20

Hi Ryan,

Thank you for contacting us.

The feature request is now open for other developers to vote for.

Meanwhile, until the mousedown and mousewheel events are exposed, you should be able to manually attach them to the rendered SVG element (within useEffect for example) or to the wrapping element directly as in the example below:

 

Regards,
Konstantin Dikov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ryan
Posted on: 13 Apr 2022 14:01

Since this is under review now, can you also take a look at exposing a mouse down event too? The click event that is available fires on mouse up. I'm also in need of the mouse down event.

Alternatively, maybe expose a reference to the canvas directly so you don't need to expose events one at a time?

What I'm trying to do is implement a mouse scroll wheel zoom feature, and a mouse drag-to-pan feature, for an image viewer component that I made. I need the mouse-down event so that I can detect if a user is holding down their mouse button. I need the scroll wheel event so that I can let the user scroll to zoom in or out.

Thank.