require(["esri/dijit/SymbolStyler"], function(SymbolStyler) { /* code goes here */ });
Description
(Added at v3.13)
A widget that assist with applying properties to Symbols.
Samples
Search for
samples that use this class.
Constructors
CSS
esri/dijit/SymbolStyler | Download source
Properties
Methods
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.
Constructor Details
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 . |
Sample:
require(["esri/dijit/SymbolStyler", ...
], function(SymbolStyler, ... ) {
var symbolStyler = new SymbolStyler(params, srcNodeRef);
...
});
Property Details
Read-only: Returns the name of the currently active tab.
Method Details
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.
Name | Description |
<Color[] > colors | Required: Selected color ramp colors. Color ramp colors will be rendered bottom-to-top. |
<Number > numStops | Number of color stops. Default is 0 . |
<Object > scheme | Associated 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. |
Returns the current style
. See the Object Specifications table below for the structure of the returned Object
.
Object Specifications: <Object
>
<Color[] > colors? |
Required |
The selected color ramp colors. |
<Symbol > symbol |
Required |
The edited symbol. |
Finalizes the creation of the widget.
Saves the recent fill
and outline
colors.
Event Details
[ On Style Events | Connect Style Event ]
Fired every time an edit is committed. (Added at v3.21)
Sample:
symbolStyler.on("style-update", function(evt){
console.log("style-update", evt);
});