Class DataSetSelectionFacade

Facade to access and manipulate the selected objects in a dataset.
Name Description
Properties
nodes an array with the selected nodes
objects an array with the selected object
relations an array with the selected relations
ways an array with the selected ways
Methods
add Adds selected objects
clear Unselects a collection of objects
clearAll Clear the selection
isSelected, has true, if an object is currently selected
set Set the selected objects as selected.
toggle Toggle the selection state of a collection of objects

Constructor

new DataSetSelectionFacade()

Creates a facade

Parameters

Name Type Description
ds DataSet the dataset. Must not be null or undefined.

Properties

nodes:array

Replies an array with the selected nodes.

objects:array

Replies an array with the selected objects.

relations:array

Replies an array with the selected relations.

ways:array

Replies an array with the selected ways.

Functions

add

Adds selected objects.

Signatures
add(id,id, ...)
Selects a variable number of objects given by their ids.
add(array|collection)
Select a variable number of objects given by an array or a java collection of ids.

clear

Unselects a collection of objects.

Signatures
clear(id,id, ...)
Unselect a variable number of objects given by their ids.
clear(array|collection)
Unselect a variable number of objects given by an array or a java collection of ids.

clearAll

Clear the selection.

isSelected

Replies true, if an object is currently selected.

Signatures
isSelected(id, type)
Replies true, if the object with numeric id id and type type is selected.
isSelected(id)
Replies true, if the object with id id is selected. id is either an instance of PrimitiveId or an object with the properties id and type, i.e. {id: 1234, type: "node"}
isSelected(obj)
Replies true, if the object obj is selected. obj is either a Node, a Way, or a Relation.

set

Set the selected objects as selected.

Signatures
set(id,id, ...)
Selects a variable number of objects given by their ids.
set(array|collection)
Select a variable number of objects given by an array or a java collection of ids.

toggle

Toggle the selection state of a collection of objects.

Signatures
toggle(id,id, ...)
Toggle the selection state of a variable number of objects given by their ids.
toggle(array|collection)
Toggle the selection state of variable number of objects given by an array or a java collection of ids.