Edit Widget and vertices

1799
5
Jump to solution
10-20-2016 07:59 AM
SebastienPelletier
Occasional Contributor

I added the edit widget in my application and it's not able to edit the vertices. By cons in the API Javacript if I double click on a feature that is possible.

https://developers.arcgis.com/javascript/3/samples/ed_simpletoolbar/

0 Kudos
1 Solution

Accepted Solutions
SebastienPelletier
Occasional Contributor

I modified the widget to ensure editing vertices. In  "bindEventsAfterCreate" function I added this:

this.own(on(this.editor.editToolbar,

   'activate',

   lang.hitch(this, function (evt) {

   if (evt.tool != 31) {

      this.editor.editToolbar.activate(1 | 2 | 4 | 8 | 16, evt.graphic);

      }

})));

Now I can edit vertices :)

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Sebastien,

  Make sure that you have enabled vertex editing (Reshape) in the widgets settings and that FeatureService allows geometry updates.

SebastienPelletier
Occasional Contributor

All is activate ( I can use the reshape tool), I also tested a webapp created in Online and is the same conclusion. Are you able to do it in your applications?

0 Kudos
DerekLaw
Community Moderator

Hi Sebastien,

In the Smart Editor widget, after you select a feature, in the pop-up for attribute editing, ensure you've checked the "Edit Geometry" option in the dialog. This should enable editing vertices.

Smart Editor Widget - editing vertices

Hope this helps,

SebastienPelletier
Occasional Contributor
SebastienPelletier
Occasional Contributor

I modified the widget to ensure editing vertices. In  "bindEventsAfterCreate" function I added this:

this.own(on(this.editor.editToolbar,

   'activate',

   lang.hitch(this, function (evt) {

   if (evt.tool != 31) {

      this.editor.editToolbar.activate(1 | 2 | 4 | 8 | 16, evt.graphic);

      }

})));

Now I can edit vertices :)

View solution in original post