Back to Tldraw

Before create/update shape

apps/examples/src/examples/events/before-create-update-shape/README.md

5.0.0258 B
Original Source

Register a handler to run before shapes are created or updated.


You can intercept the creation or update of any record in the store and return a new record to be used in it place. In this example, we lock shapes to a circle in the center of the screen.