new SelectionMap()
Creates a new selection set instance.
Extends
- Map
Members
-
:boolean
isSelectionMap <readonly>
-
A flag identifying this object as a selection set.
Type
- boolean
-
:PD.SELECTED
type <readonly>
-
Stores the type of the currently stored selection data.
Type
Methods
-
clear( [type])
-
Clears and empties the selection set.
Parameters:
Name Type Argument Description typePD.SELECTED <optional>
An optional type to set once cleared, defaults to
PD.SELECTED.NONE.Returns:
Returns this instance to support method chaining.
- Type
- PD.SelectionSet
-
clone()
-
Creates a shallow copy of the selection set.
This is primarily used by the undo/redo system to keep a copy of the actioned selection set. The arrays stored in the associated data objects are not reused when the selection changes or is cleared, so it is safe for them to nbe stored directly in undo/redo steps.
Returns:
Returns a new selection set.
- Type
- PD.SelectionSet
-
setType(type)
-
Sets the type of the currently stored selection data.
If the new type is different from the previous type, the existing selection set will be cleared.
Parameters:
Name Type Description typePD.SELECTED The new type to set.
Returns:
Returns this instance to support method chaining.
- Type
- PD.SelectionSet