Skip to content

Commit

Permalink
Merge pull request #218 from Pietrrrek/master
Browse files Browse the repository at this point in the history
Add trigger-property documentation
  • Loading branch information
simonwep authored Dec 16, 2023
2 parents ff34f72 + 325f76f commit 296cce0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/vanilla/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,21 @@ const selection = new SelectionArea({
// Or specifiy the threshold for each axis by passing an object like {x: <number>, y: <number>}.
startThreshold: 10,

// List of triggers that should cause the selection to begin.
// Each element in the list can be one of the following
// - a MouseButton (numbers 0 through 4)
// see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button#value
// - an object of shape { button: MouseButton, modifiers: Modifier[] }
// where a Modifier is ( 'ctrl' | 'meta' | 'alt' | 'shift' )
//
// To trigger the selection with e.g. <CTRL + SHIFT + LEFT-CLICK> OR <RIGHT-CLICK> the
// trigger property should look like
//
// triggers: [ { button: 0, modifiers: [ "ctrl", "shift" ] }, 2 ]
//
// The default value is [0], enabling only the main mouse button (usually left click).
triggers: [0]

// Scroll configuration.
scrolling: {

Expand Down

0 comments on commit 296cce0

Please sign in to comment.