@mocanvas/editor · interface

BindingCanBindOptions

interface BindingCanBindOptions<From extends UnknownShape = UnknownShape, To extends UnknownShape = UnknownShape>

What a shape is asked before a binding is made between it and another shape.

v5 hands over the **records**, not their type names: a util that used to branch on toShapeType now reads toShape.type, and one that needs more than the type — a locked target, a prop, the parent — has it without a second lookup through the editor.


Properties · 3

bindingType: string

The binding type about to be created.

fromShape: From

The shape the binding starts at (binding.fromId).

toShape: To

The shape the binding ends at (binding.toId).

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.