new IWLayerGroup(groupName)
Creates a new layer group.
Parameters:
Name | Type | Description |
---|---|---|
groupName |
String | the name of the layer group |
Extends
Methods
-
add(node)
-
Adds a new node.
Parameters:
Name Type Description node
Object Object with tree functionality - Inherited From:
Returns:
- Type
- void
-
addLayer(layer)
-
Adds an IWLayer or IWLayerGroup to this group. NOTE: Do NOT use add() as this function doesn't update the visibilities!
Parameters:
Name Type Description layer
IWLayerInterface instance of IWLayer
orIWLayerGroup
Returns:
- Type
- void
-
checkIfExistsAsParent(node)
-
Checks if node already exists as predecessor (to prevent circles).
Parameters:
Name Type Description node
Object Object with tree functionality - Inherited From:
Returns:
- Type
- Boolean
-
getChildren()
-
Returns an array with all children
- Inherited From:
Returns:
children- Type
- Array
-
getGroupName()
-
Returns the name of this group.
Returns:
groupName- Type
- String
-
getName()
-
Returns name of the node element
- Inherited From:
Returns:
name- Type
- String
-
getParent()
-
Returns parent node
- Inherited From:
Returns:
node Object with tree functionality- Type
- Object
-
hasChild(child)
-
Checks if node exists as child.
Parameters:
Name Type Description child
Object - Inherited From:
Returns:
- Type
- Boolean
-
hasChildren()
-
Returns a boolean if node has any childs
- Inherited From:
Returns:
- Type
- Boolean
-
isMarked()
-
Returns if node is marked.
- Inherited From:
Returns:
- Type
- Boolean
-
isVisible()
-
Overwrites function for IWLayerInterface. Checks if this layer is visible or not.
- Overrides:
Returns:
true if this group is visible otherwise false.- Type
- boolean
-
mark()
-
Marks the node. Throws 'statechanged' event if node was unmarked.
- Inherited From:
Returns:
- Type
- void
-
remove(node)
-
Removes the node from the children.
Parameters:
Name Type Description node
Object Object with tree functionality - Inherited From:
Returns:
- Type
- void
-
removeLayer(layer)
-
Removes an IWLayer or IWLayerGroup from this group. NOTE: Do NOT use remove() as this function doesn't update the visibilities!
Parameters:
Name Type Description layer
IWLayerInterface instance of IWLayer
orIWLayerGroup
Returns:
- Type
- void
-
removeLayerByName(layerName)
-
Removes an IWLayer or IWLayerGroup from this group by its name. NOTE: Do NOT use remove() as this function doesn't update the visibilities!
Parameters:
Name Type Description layerName
String Returns:
layer instance ofIWLayer
orIWLayerGroup
- Type
- IWLayerInterface
-
setGroupName(groupName)
-
Sets the name of this group.
Parameters:
Name Type Description groupName
String Returns:
- Type
- void
-
setName(name)
-
Sets name of the node element
Parameters:
Name Type Description name
String the name of the node element - Inherited From:
Returns:
- Type
- void
-
setParent(newParent)
-
Sets the parent of this node
Parameters:
Name Type Description newParent
Object the parent node. - Inherited From:
Returns:
- Type
- void
-
setUseDefaults(useDefaults)
-
Sets if the defaults should be used.
Parameters:
Name Type Description useDefaults
boolean - Inherited From:
Returns:
- Type
- void
-
setVisible(visible)
-
Sets the visibility of node and updates it for the whole tree
Parameters:
Name Type Description visible
boolean - Inherited From:
Returns:
- Type
- void
-
toString()
-
Returns a string representation of this layer group.
Returns:
- Type
- String
-
triggerOnRemove()
-
Triggers the
onremove
event.Returns:
- Type
- void
-
unmark()
-
Unmarks the node. Throws 'statechanged' event if node was marked.
- Inherited From:
Returns:
- Type
- void
-
useDefaults()
-
Returns if defaults should be used.
- Inherited From:
Returns:
- Type
- boolean