Skip to main content

Home > @jsplumbtoolkit/core > JsPlumbToolkit > setSelectionCapacityPolicy

JsPlumbToolkit.setSelectionCapacityPolicy() method#

Sets The action taken when appending an edge or node that would take the selection above its limit for that given type. Depends on the current capacityPolicy, which can be either Selection.DISCARD_EXISTING (the default) or Selection.DISCARD_NEW.

Signature:

setSelectionCapacityPolicy(policy: string): void;

Parameters#

ParameterTypeDescription
policystringOne of Selection.DISCARD_EXISTING (which removes the 0th entry from the list before insertion of the new value) or Selection.DISCARD_NEW.

Returns:

void