I am trying to modify the Screening widget. In one of its subfolders, "drawtool" in the file drawtool,js it emits the completion of the draw by using:
this.emit("onDrawComplete", [graphics]);
to the widget.js
this.own(on(this._drawTool, "onDrawComplete", lang.hitch(this, function (graphics) {
this._initToCreateAOIBuffer(graphics);
})));
I created my own file under the drawtool folder and I need to emit the same event from that file:
this.emit("onDrawComplete", [thePMPTgraphic]);
However, the emit is not working. The issue is not the thePMPTgraphic, since it was tested.
Any ideas why the emit works in drawtools.js and not in the custom file? I have other functions in the custom file and are working properly.