Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: SymbolStyler

dojo.require("esri.dijit.SymbolStyler")

Description

(Added at v3.13)
A widget that assist with applying properties to Symbols.

Samples

Search for samples that use this class.

Constructors

NameSummary
new esri.dijit.SymbolStyler(params, srcNodeRef)Creates a new SymbolStyler widget.

CSS

esri/dijit/SymbolStyler | Download source

Properties

NameTypeSummary
activeTabStringRead-only: Returns the name of the currently active tab.

Methods

NameReturn typeSummary
edit(symbol, options)NoneSets the symbol to edit.
getStyle()ObjectReturns the current style.
startup()NoneFinalizes the creation of the widget.
storeColors()NoneSaves the recent fill and outline colors.

Events

[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.

Events

NameEvent ObjectSummary
style-updateFired every time an edit is committed.
Constructor Details

new esri.dijit.SymbolStyler(params, srcNodeRef)

Creates a new SymbolStyler widget.
Parameters:
<Object> params Required Set of parameters used to specify the SymbolStyler widget options.
<Node | String> srcNodeRef Required Reference or ID of the HTMLElement where the widget should be rendered.
params properties:
<String | Object> portal Optional Added at v. 3.15, this supersedes portalSelf and portalUrl. Portal can be either:
  • A portal instance. The default is "http://arcgis.com/",
  • A portalSelf response Object, or
  • A portalUrl String.
<Object> portalSelf Optional Self response of Portal used as symbol provider. More information on the Portal Self response can be found here. NOTE: Deprecated as of v. 3.15, instead use Portal. Prior to this, portalSelf superseded portalUrl.
<String> portalUrl Optional URL to Portal used as symbol provider. Default is http://www.arcgis.com.
NOTE: Deprecated as of v. 3.15, instead use Portal.
Property Details

<String> activeTab

Read-only: Returns the name of the currently active tab.
Method Details

edit(symbol, options)

Sets the symbol to edit.
Parameters:
<Symbol> symbol Required Symbol to edit.
<Object> options Required Styling options. See the Object Specifications table below for the structure of the opts object.
Object Specifications:
<options>
<String> activeTab Required Name of the active tab, can be either shape, fill or outline. If the requested tab is not enabled the 1st available tab will be selected.
<Object> colorRamp Optional Color ramp options.
NameDescription
<Color[]> colorsRequired: Selected color ramp colors. Color ramp colors will be rendered bottom-to-top.
<Number> numStopsNumber of color stops. Default is 0.
<Object> schemeAssociated color ramp scheme.
<Boolean> externalSizing Required When true, disables the sizing controls (width for line, otherwise size). Default is false.
<Object> schemes Required Required: Schemes used for color suggestions.

getStyle()

Returns the current style. See the Object Specifications table below for the structure of the returned Object.
Return type: Object
Object Specifications:
<Object>
<Color[]> colors? Required The selected color ramp colors.
<Symbol> symbol Required The edited symbol.

startup()

Finalizes the creation of the widget.

storeColors()

Saves the recent fill and outline colors.
Event Details
[ On Style Events | Connect Style Event ]

style-update

Fired every time an edit is committed. (Added at v3.21)
Sample:
symbolStyler.on("style-update", function(evt){
 console.log("style-update", evt);
}); 
Show Modal