[map,bugfix][xs]: tick / untick autozoom control correctly.
This commit is contained in:
@@ -448,7 +448,7 @@ my.MapMenu = Backbone.View.extend({
|
|||||||
events: {
|
events: {
|
||||||
'click .editor-update-map': 'onEditorSubmit',
|
'click .editor-update-map': 'onEditorSubmit',
|
||||||
'change .editor-field-type': 'onFieldTypeChange',
|
'change .editor-field-type': 'onFieldTypeChange',
|
||||||
'change #editor-auto-zoom': 'onAutoZoomChange'
|
'click #editor-auto-zoom': 'onAutoZoomChange'
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
@@ -472,13 +472,19 @@ my.MapMenu = Backbone.View.extend({
|
|||||||
if (this._geomReady() && this.model.fields.length){
|
if (this._geomReady() && this.model.fields.length){
|
||||||
if (this.state.get('geomField')){
|
if (this.state.get('geomField')){
|
||||||
this._selectOption('editor-geom-field',this.state.get('geomField'));
|
this._selectOption('editor-geom-field',this.state.get('geomField'));
|
||||||
$('#editor-field-type-geom').attr('checked','checked').change();
|
this.el.find('#editor-field-type-geom').attr('checked','checked').change();
|
||||||
} else{
|
} else{
|
||||||
this._selectOption('editor-lon-field',this.state.get('lonField'));
|
this._selectOption('editor-lon-field',this.state.get('lonField'));
|
||||||
this._selectOption('editor-lat-field',this.state.get('latField'));
|
this._selectOption('editor-lat-field',this.state.get('latField'));
|
||||||
$('#editor-field-type-latlon').attr('checked','checked').change();
|
this.el.find('#editor-field-type-latlon').attr('checked','checked').change();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.state.get('autoZoom')) {
|
||||||
|
this.el.find('#editor-auto-zoom').attr('checked', 'checked');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.el.find('#editor-auto-zoom').removeAttr('checked');
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user