Skip to main content
Version: 4.3

SnaplinesIsSnapTarget

type SnaplinesIsSnapTarget = (params) => boolean;

React-style snap-target predicate for Snaplines: return true if targetModel should be a snap target for model (the active element), false to exclude it. Receives SnaplinesIsSnapTargetParams.

Inverts the native ui.Snaplines.Options['filter'] function form (where true means "exclude") for a more intuitive React API. Array forms of the native filter option are still reachable via the options escape hatch.

Parameters​

ParameterType
paramsSnaplinesIsSnapTargetParams

Returns​

boolean

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub