API Constants look up table?

1162
4
07-26-2016 02:31 PM
SteveCole
Frequent Contributor


I currently want to check if the Editor is active or not so I noticed that the Editor has a getCurrentState method (undocumented?) which returns an object that contains a reference to the current tool, graphic, and a "isModified" boolean value. When the Editor is deactivated, the tool item is set to a value of zero. This got me wondering what that represents and I can't find any cross reference. The API Editor Reference has a list of constants but not what the true value of that constant is. I could assume that zero means the Editor is not active but I'd rather know definitively.

Is there some location with this information about constants used in the 3.x API? Somewhat related, is there some other way I can determine if the Editor is active or not?

0 Kudos
4 Replies
thejuskambi
Occasional Contributor III

You must be confused with toolbars/edit vs dijit/editor. Editor does not contain any method by name "getCurrentState". The Editor contains an instance of edit toolbar may be you saw that.

0 Kudos
SteveCole
Frequent Contributor

That's why I mentioned that it may be an undocumented method, just like the myriad of properties/methods for ESRI digits that begin with an underscore ("_layer", etc).

0 Kudos
thejuskambi
Occasional Contributor III

I have gone through the script as well the node, the "esri/dijit/editing/Editor", does not have any method by name "getCurrentState".

0 Kudos
SteveCole
Frequent Contributor

My bad, looks like you were correct.

0 Kudos