Skip to content
pixi-silk
GitHub repository
Interface

MarqueeOptions

import type { MarqueeOptions } from 'pixi-silk/ui/marquee';

Options of Marquee.

Properties#

PropertyTypeDescriptionDefined in
autoPan?booleanPans the camera while the pointer is within 24 pixels of the view’s edge, up to 600 pixels a second. Default true.ui/marquee.ts:48
cameraCameraThe camera: the rectangle is drawn on screen and tested in its world.ui/marquee.ts:21
candidates?| readonly Container<ContainerChild>[] | (() => readonly Container<ContainerChild>[])Objects the rectangle can pick, or a function called on every move that returns them. Hidden, destroyed and detached ones are skipped. Ignored when hit is given.ui/marquee.ts:32
clearOnClick?booleanA click on empty canvas without Shift clears the selection (calls onChange with []). Default true.ui/marquee.ts:46
color?ColorSourceColour of the rectangle’s fill and border. Default 0x0a84ff.ui/marquee.ts:50
hit?(rect: WorldRect, mode: MarqueeMode) => readonly Container<ContainerChild>[]Your own hit test: what the world rectangle picks. Use it for spatial indexes or custom shapes.ui/marquee.ts:34
mode?MarqueeModeInitial value of Marquee.mode. Default intersect.ui/marquee.ts:36
onChange?(selection: readonly Container<ContainerChild>[], hits: readonly Container<ContainerChild>[]) => voidCalled when the selection changes during a drag, with the new selection and what the rectangle covers.ui/marquee.ts:40
onEnd?(selection: readonly Container<ContainerChild>[]) => voidCalled when a drag ends with the final selection. Not called on cancel.ui/marquee.ts:44
onStart?() => voidCalled when the pointer has moved past the tap slop and the rectangle appears.ui/marquee.ts:42
profiles?Partial<Record<InputKind, Partial<InputProfile>>>Per pointer kind overrides of slop, how far a press moves before the rectangle starts.ui/marquee.ts:52
selection?() => readonly Container<ContainerChild>[]Returns the selection before the drag, read once on press, for Shift and Alt. Default empty.ui/marquee.ts:38
surfaceContainerWhere presses on empty canvas land, usually app.stage with hitArea = app.screen. A drag starts only when the press hit this container itself, not one of its children. Its eventMode is set to static when it was none, passive or auto.ui/marquee.ts:27
ticker?Ticker | nullTicker that runs fades and auto-pan. Default Ticker.shared. With null, call Marquee.tick yourself.ui/marquee.ts:54