require(["esri/dijit/editing/Update"], function(Update) { /* code goes here */ });
Description
(Added at v2.2)
This class is used with the
UndoManager
to provide undo/redo functionality of
Update
operations when editing.
Samples
Search for
samples that use this class.
Class hierarchy
esri/dijit/editing/OperationBase
|_esri/dijit/editing/Update
Constructors
Properties
label | String | Details about the operation, for example: "Update" may be the label for an edit operation that updates features. |
type | String | The type of operation, for example: "edit" or "navigation". |
Methods
Constructor Details
Create a new Update operation.
Parameters:
<Object > params |
Required |
See options list for parameters. |
params
properties:
<FeatureLayer > featureLayer |
Optional |
The feature layer that contains the updated feature(s). |
<Graphic[] > postUpdatedGraphics |
Optional |
The updated feature(s). |
<Graphic[] > preUpdatedGraphics |
Optional |
The feature(s) prior to the update. |
Sample:
require([
"esri/layers/FeatureLayer", "esri/dijit/editing/Update", "esri/graphic", ...
], function(FeatureLayer, Update, Graphic, ... ) {
var layer = new FeatureLayer( ... );
var operation = new Update({
featureLayer: layer,
preUpdatedGraphics: [new Graphic(originalFeature)],
postUpdatedGraphics: [feature]
});
...
});
Property Details
Details about the operation, for example: "Update" may be the label for an edit operation that updates features.
The type of operation, for example: "edit" or "navigation".
Method Details
Redo the current operation.
Undo the current operation.