npeihl

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

Discussion created by npeihl on Oct 22, 2013
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?

Outcomes