client/util-selection

Selection

Source:

Methods

(inner) updateSelection(Partition, Group)

Update the selection with a given group or interval or, if no group is given, clear the selection.

For categorial selections the following rules are used:

  1. none selected: add the group to the selection
  2. one selected and the group is the same: invert the selection
  3. one selected and the group is different: add the group to the selection
  4. more than one selected and the group is in the selection: remove the group from the selection
  5. more than one selected and the group is not in the selection: add the group to the selection

For continuous selections the following rules are used:

  1. no range selected set the range equal to that of the group
  2. a range selected and the group is outside the selection: extend the selection to include the group
  3. a range selected and the group is inside the selection: set the endpoint closest to the group to that of the group
Parameters:
Name Type Description
Partition Partition

to update

Group string | Array.<number>

or interval

Source: