Skip to content
pixi-silk
GitHub repository
Function

bindMeasure

import { bindMeasure } from 'pixi-silk/selection';
function bindMeasure<T>(
   selection: Selection<T>, 
   measure: MeasureLike<NoInfer<T>>, 
   options?: BindMeasureOptions
): {
  stop: () => void;
  sync: () => void;
};

Shows the primary item’s size and the distances to the hovered item with measure. Call the returned sync again when a condition of between changes (a modifier key). The returned stop stops following.

Type Parameters#

Type Parameter
T

Parameters#

ParameterType
selectionSelection<T>
measureMeasureLike<NoInfer<T>>
optionsBindMeasureOptions

Returns#

{
  stop: () => void;
  sync: () => void;
}
NameTypeDefined in
stop()() => voidselection.ts:276
sync()() => voidselection.ts:276