Skip to content

Controlled Viewport

Drive the viewport from your own state. The canvas's Viewport parameter is bound to a field that OnViewportChanged keeps up to date as you pan and zoom; Reset and Center write that field directly and the canvas follows. Fit goes through the imperative API, which reports back through the same callback.

x: 0 · y: 0 · zoom: 1.00
Node 1
Node 2
Node 3
bit Blow
An unhandled error has occurred. Reload 🗙