Class GSStyleInspector
Extends GSPanel.
Inspector for viewing and modifying style values of vector graphics features.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Creates a new
GSStyleInspector |
| Method Attributes | Method Name and Description |
|---|---|
|
Returns the feature currently being inspected
|
|
| <static> |
GSStyleInspector.getInstance()
Returns the singleton instance of the style inspector
|
|
hide()
Hides the inspector
|
|
|
listenForSelectionEvents(comp)
A component that the style inspector should listen to for selection
events.
|
|
|
mask()
Puts a mask over the inspector to disable user interaction
|
|
|
Restores the state of the selected feature
|
|
|
setFeature(feature)
Sets a feature to inspect
|
|
|
show(pos)
Shows the inspector
|
|
|
Stops inspecting the feature being inspected (if there is one)
|
|
|
unmask()
Removes a previously applied mask
|
|
|
Unsets the feature currently being inspected
|
- Methods borrowed from class GSPanel:
- addEventListener, disableEventPropagation, getContentElement, getElement, getSize, setBackgroundColor, setContent, setPosition, setSize, setVisible
Method Detail
{GSVectorGraphics}
getFeature()
Returns the feature currently being inspected
- Returns:
- {GSVectorGraphics} the inspected feature, or
nullif no feature is currently being inspected
<static>
{GSStyleInspector}
GSStyleInspector.getInstance()
Returns the singleton instance of the style inspector
- Returns:
- {GSStyleInspector} the inspector instance
hide()
Hides the inspector
listenForSelectionEvents(comp)
A component that the style inspector should listen to for selection
events. This method is called automatically during instantiation of
GSMap if the svg module has been loaded
prior to map instantiation. If loading the svg module
on demand, call this method explicitly after map instantiation.
var map = new GSMap('map');
GSStyleInspector.getInstance().listenForSelectionEvents(map);
- Parameters:
- {Object} comp
- the component for the inspector to listen to
mask()
Puts a mask over the inspector to disable user interaction
restoreFeatureState()
Restores the state of the selected feature
setFeature(feature)
Sets a feature to inspect
- Parameters:
- {GSVectorGraphics} feature
- the feature to set
show(pos)
Shows the inspector
- Parameters:
- {GSPoint} pos Optional
- the position to show the inspector at
stopInspecting()
Stops inspecting the feature being inspected (if there is one)
unmask()
Removes a previously applied mask
unsetFeature()
Unsets the feature currently being inspected