Skip to content

Commit

Permalink
DDF-3176 Disable shape editing when query editing is disabled. (#2163)
Browse files Browse the repository at this point in the history
* DDF-3176 Disable shape editing when query editing is disabled.

* DDF-3176 Fix for keywords so shape doesn't get cleared
  • Loading branch information
troymohl authored and millerw8 committed Jul 27, 2017
1 parent 9360e99 commit 27e24bc
Showing 1 changed file with 25 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,29 +533,39 @@ define([
});
},
drawLine: function () {
this.clearLocation();
wreqr.vent.trigger('search:drawline', this.model);
this.changeMode("line");
if (this.propertyModel.get('property').get('isEditing')) {
this.clearLocation();
wreqr.vent.trigger('search:drawline', this.model);
this.changeMode("line");
}
},
drawCircle: function () {
this.clearLocation();
wreqr.vent.trigger('search:drawcircle', this.model);
this.changeMode("circle");
if (this.propertyModel.get('property').get('isEditing')) {
this.clearLocation();
wreqr.vent.trigger('search:drawcircle', this.model);
this.changeMode("circle");
}
},
drawPolygon: function () {
this.clearLocation();
wreqr.vent.trigger('search:drawpoly', this.model);
this.changeMode("polygon");
if (this.propertyModel.get('property').get('isEditing')) {
this.clearLocation();
wreqr.vent.trigger('search:drawpoly', this.model);
this.changeMode("polygon");
}
},
drawBbox: function () {
this.clearLocation();
wreqr.vent.trigger('search:drawbbox', this.model);
this.changeMode("bbox");
if (this.propertyModel.get('property').get('isEditing')) {
this.clearLocation();
wreqr.vent.trigger('search:drawbbox', this.model);
this.changeMode("bbox");
}
},
searchByKeyword: function () {
this.clearLocation();
this.model.set({hasKeyword: true});
this.changeMode("keyword");
if (this.propertyModel.get('property').get('isEditing')) {
this.clearLocation();
this.model.set({hasKeyword: true});
this.changeMode("keyword");
}
},
onLineUnitsChanged: function () {
this.$('#lineWidthValue').val(this.getDistanceFromMeters(this.model.get('lineWidth'), this.$('#lineUnits').val()));
Expand Down

0 comments on commit 27e24bc

Please sign in to comment.