Select to view content in your preferred language

Measurement Widget setTool(tool, false) doesn't remove activeTool attribute

482
0
10-22-2013 08:55 AM
deleted-user-1T_bOHag6M8d
Deactivated User
I'm using the ArcGIS Javascript API v3.7 and I've discovered that the activeTool attribute in the Measurement widget does not get cleared when the setTool(evt.activeTool, false) function is called.

var measurement = new Measurement({
    map:map,
    defaultAreaUnit: Units.ACRES,
    defaultLengthUnit: Units.FEET
}, registry.byId("measureDiv"));
measurement.startup()
console.log(measurement.activeTool); // returns "undefined"

measurement.setTool("area", true);
console.log(measurement.activeTool); //returns "area"

measurement.setTool("area",false);
console.log(measurement.activeTool); // still returns "area". shouldn't this attribute be cleared, returning null or something else?
0 Kudos
0 Replies