new Profile3dPanel( [options])
This control allow to create and show lists of profile3d definition features to be loaded in profile3d viewer.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
options |
Mapspace.control.ControlOptions |
<optional> |
Panel options. |
- Source:
- mapspace/controls/profile3dpanel.js
Fires:
Extends
Methods
-
addProfile3d(profile3d, select)
-
Adds a new profile definition and updates the listboxes.
Parameters:
Name Type Description profile3d
ol.Feature The profile definition.
select
boolean Optional. If set added profile as selected or not. Default is true.
- Source:
- mapspace/controls/profile3dpanel.js
-
addSection(element, name, key, text, classType, collapsed)
-
Adds a section button to the control.
Parameters:
Name Type Argument Description element
HTMLElement Element in which inserting the section.
name
string Name for the section.
key
string <nullable>
Globalization key. If not provided or not exist a value for it the default text will be used.
text
string Default text to show in case globalization key is null or not exist.
classType
Object Optional class type to use for creation of the element that must be returned.
collapsed
boolean <nullable>
Optional boolean. If section must be created collapsed or not.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
Element for inserting controls or control if classType param is passed.
- Type
- HTMLElement | Mapspace.control.Control
-
clearControl()
-
Clears all the HTML elements under the control element and clear listeners.
- Source:
- mapspace/controls/profile3dpanel.js
-
containsInteractiveTool(tool)
-
Returns true if this control contains the given interactive tool.
Parameters:
Name Type Argument Description tool
Mapspace.InteractiveToolNames <nullable>
The tool name.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- boolean
-
getButtonDisabled(name)
-
Gets if a button is disabled or not.
Parameters:
Name Type Description name
Mapspace.ToolNames The name of the button.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- boolean
-
getButtonSelected(name)
-
Gets if a button is selected or not.
Parameters:
Name Type Description name
Mapspace.ToolNames The name of the button.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- boolean
-
getButtonVisibility(name)
-
Gets the visibility of a button.
Parameters:
Name Type Description name
Mapspace.ToolNames The name of the button.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- boolean
-
getCurrentData()
-
Returns a cloned object of the internal data object with profile definitions.
- Source:
- mapspace/controls/profile3dpanel.js
Returns:
- Type
- Object
-
getCurrentInteractiveTool()
-
Returns the current interactive tool selected in the control or null if none.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
-
getSectionsUniqueNumber()
-
Returns a unique number (as string) to use in IDs inside sections, to avoid collisions between IDs. Each control deriving this class must implement its own method.
- Inherited From:
- Overrides:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- string
-
getSelectedProfile3d()
-
Returns the selected profile3d, if any.
- Source:
- mapspace/controls/profile3dpanel.js
Returns:
- Type
- ol.Feature
-
getSidePanel()
-
Returns the reference to the Side Panel this panel belongs to or null if no Side Panel is set.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
-
getToolObjects()
-
Returns the array of objects that contain the tool buttons.
- Inherited From:
- Overrides:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- Array.<Mapspace.ToolDefinition>
-
hideProfiles3dButtons()
-
Hide profiles 3d buttons.
- Source:
- mapspace/controls/profile3dpanel.js
-
isSectionCollapsed(name)
-
Returns true if a section is collapsed.
Parameters:
Name Type Description name
string Name of section.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- boolean
-
isSectionVisible(name)
-
Returns true if a section is visible.
Parameters:
Name Type Description name
string Name of section.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
Returns:
- Type
- boolean
-
notifyButtonClick(tool, interactive [, layer] [, features])
-
Notifies that a given tool has been selected.
Parameters:
Name Type Argument Description tool
Mapspace.ToolNames <nullable>
The tool selected or null if tool has been deselected.
interactive
boolean If the tool is interactive or not.
layer
Mapspace.layer.Vector <optional>
An optional layer the selected tool must affect.
features
Array.<ol.Feature> <optional>
An optional array of features the selected tool must affect.
- Source:
- mapspace/controls/profile3dpanel.js
-
removeProfile3d(name)
-
Removes a profile definition with given name and updates listboxes.
Parameters:
Name Type Description name
string The name of the profile to remove.
- Source:
- mapspace/controls/profile3dpanel.js
-
resetControl()
-
Reset control and data
- Source:
- mapspace/controls/profile3dpanel.js
-
selectInteractiveTool(tool)
-
Sets one interactive tool as selected. If tool passed is null then any interactive tool in the control is unselected. This function do not executes any related action due to tool selection, it just modifies the visual state of buttons.
Parameters:
Name Type Argument Description tool
Mapspace.InteractiveToolNames <nullable>
The tool name.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
setAllButtonsVisibility(viewType)
-
Sets the visibility of buttons to the correct one for the given view type.
Parameters:
Name Type Description viewType
Mapspace.ViewType The view type.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
setButtonDisabled(name, disabled)
-
Sets if a button is disabled or not. This do not trigger any event, just modifies the visual state of the button.
Parameters:
Name Type Description name
Mapspace.ToolNames The name of the button.
disabled
boolean If the button must be disabled or not.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
setButtonSelected(name, selected)
-
Sets if a button is selected or not. This do not trigger any event, just modifies the visual state of the button.
Parameters:
Name Type Description name
Mapspace.ToolNames The name of the button.
selected
boolean If the button must be selected or not.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
setButtonsVisibility(names, visible)
-
Sets the visibility of a button or several buttons using its tools name.
Parameters:
Name Type Description names
Mapspace.ToolNames | Array.<Mapspace.ToolNames> One or several names of the buttons to modify.
visible
boolean If the buttons must be visible or not.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
setData(data)
-
Sets data object to be used by control. This method do not refreshes the control. Use
updateFromData
.Parameters:
Name Type Description data
Object The data object.
- Source:
- mapspace/controls/profile3dpanel.js
-
setSectionCollapsed(name, collapsed)
-
Sets a section as collapsed or uncollapsed.
Parameters:
Name Type Description name
string Name of the section.
collapsed
boolean True to collapse, false to uncollapse.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
setSectionVisible(name, visible)
-
Sets a section visible or hidden.
Parameters:
Name Type Description name
string Name of the section.
visible
boolean True to show, false to hide.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
setSidePanel(panel)
-
Sets the reference to the Side Panel this panel belongs to. This do not re-targets the HTML element of the panel. Use setTarget for that.
Parameters:
Name Type Description panel
Mapspace.control.SidePanel The Side panel reference.
- Inherited From:
- Source:
- mapspace/controls/toolscontrol.js
-
updateButtons()
-
Updates the buttons in tools section.
- Source:
- mapspace/controls/profile3dpanel.js
-
updateControl(element)
-
Updates the control. - Clear the control - Get translation texts - Define buttons - Set handlers for buttons
Parameters:
Name Type Description element
HTMLElement The element of the control.
- Source:
- mapspace/controls/profile3dpanel.js
-
updateFromData()
-
Updates listboxes using current data.
- Source:
- mapspace/controls/profile3dpanel.js
-
updateInteractiveTools(tool)
-
Updates the control using the given interactive tool name. If it is not one interactive tool contained in the control then the control deselects the current interactive tool without triggering any event. If null deselects all.
Parameters:
Name Type Argument Description tool
Mapspace.InteractiveToolNames <nullable>
The current interactive tool or null if no interactive tool is currently active.
- Source:
- mapspace/controls/profile3dpanel.js
-
updateVisibleIndex()
-
Updates profile list box and the visible index based on selected index.
- Source:
- mapspace/controls/profile3dpanel.js