Cancel Edit Operation in JS API Editor Widget

907
3
03-04-2013 11:11 AM
MeleKoneya
Occasional Contributor III
When using a Template Picker within the Editor Widget to add features,   I would like to be able to cancel the operation once the user has selected a feature from the Template Picker and before clicking on the map.     What happens now is that the user must place the feature once the Template Picker has been clicked and I have not found a way to cancel the operation before placing a feature.

Am I missing a tool or setting in either the Template Picker and/or Editor Widget or is there another way to code around this issue.

Thanks

Mele
0 Kudos
3 Replies
DianaBenedict
Occasional Contributor III
Though it is not intuitive, I believe that the user can disable the template picker by clicking on the "feature" again...essentially, think of it as a "toggle" button. 

With that said, I have not found a way to "escape" once a user has started drawing a feature on the map.  For example using the the "esc" button or right click and cancel the sketch. I would assume that we as developers would have to "plug" in all this plumbing to allow the user to terminate drawing a graphic prior to finishing drawing a graphic on the map - "double-click".
0 Kudos
MeleKoneya
Occasional Contributor III
Diana,

Thanks for the information.   I did not know that clicking the feature again in the template picker would cancel.   As you said, not intuitive, but at least a way out of the process for our users.

Mele
0 Kudos
MeleKoneya
Occasional Contributor III
Another way around this is to add a buttoon that clears the selected feature in the TemplatePicker using the clearSelection method:

http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/#TemplatePicker/clearSelection

Mele
0 Kudos