Skip to content

Commit

Permalink
create separate stopDrawing method for button with same name.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgee committed Dec 15, 2015
1 parent 12ffb24 commit a74d480
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions widgets/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,11 @@ define([
}
},

stopDrawing: function () {
this.cancelDrawing();
this.connectMapClick();
},

cancelDrawing: function () {
this.hideInfoWindow();
this.disconnectMapClick();
Expand Down
2 changes: 1 addition & 1 deletion widgets/Search/templates/Search.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<button data-dojo-type="dijit/form/ToggleButton" data-dojo-attach-point="searchFreehandPolylineButtonDijit" data-dojo-props="iconClass:'draw-icon-freehand-polyline',showLabel:false" data-dojo-attach-event="onClick:drawFreehandPolyline" title="${i18n.Buttons.selectByFreehandPolyline}"></button>
<button data-dojo-type="dijit/form/ToggleButton" data-dojo-attach-point="searchPolygonButtonDijit" data-dojo-props="iconClass:'draw-icon-polygon',showLabel:false" data-dojo-attach-event="onClick:drawPolygon" title="${i18n.Buttons.selectByPolygon}"></button>
<button data-dojo-type="dijit/form/ToggleButton" data-dojo-attach-point="searchFreehandPolygonButtonDijit" data-dojo-props="iconClass:'draw-icon-freehand-polygon',showLabel:false" data-dojo-attach-event="onClick:drawFreehandPolygon" title="${i18n.Buttons.selectByFreehandPolygon}"></button>
<button data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'fa fa-stop',showLabel:false" data-dojo-attach-point="searchStopDrawingButtonDijit" data-dojo-attach-event="onClick:cancelDrawing" title="${i18n.Buttons.stopDrawing}"></button>
<button data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'fa fa-stop',showLabel:false" data-dojo-attach-point="searchStopDrawingButtonDijit" data-dojo-attach-event="onClick:stopDrawing" title="${i18n.Buttons.stopDrawing}"></button>
<button data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'fa fa-info-circle',showLabel:false,disabled:true" data-dojo-attach-point="searchIdentifyButtonDijit" data-dojo-attach-event="onClick:useIdentifiedFeatures" title="${i18n.Buttons.selectByIdentify}"></button>
<button data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'fa fa-binoculars',showLabel:false,disabled:true" data-dojo-attach-point="searchSelectedButtonDijit" data-dojo-attach-event="onClick:useSelectedFeatures" title="${i18n.Buttons.selectBySelected}"></button>
</div>
Expand Down

0 comments on commit a74d480

Please sign in to comment.