@mocanvas/editor · function

canBindShapes

declare function canBindShapes(editor: Editor, opts: {
    fromShape: ShapeRef;
    toShape: ShapeRef;
    binding: string | {
        type: string;
    };
}): boolean

Whether a binding of bindingType may be created between two shapes.

BOTH utils have to agree. An arrow util that is happy to bind to anything still must not bind to a shape whose own util refuses — that is how a shape declares itself un-bindable — so this is an and, never an or.

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.