Smooth zoom example - Rete.js

Smooth zoom

API

The editor comes with instant zoom enabled by default, with a step equivalent to one scroll wheel movement. If you require customization of this behavior, you can extend the Zoom class

Within this example, the core logic is contained in src/zoom.ts. To integrate it into the editor, just include the following line:

ts
area.area.setZoomHandler(new SmoothZoom(0.5, 200, "cubicBezier(.45,.91,.49,.98)", area));