Sets the default style

pull/4250/head
Javier Arce 9 years ago
parent 1c9ef235c4
commit 8e78b93a1f

@ -290,15 +290,27 @@ module.exports = BaseDialog.extend({
},
_geoAttr: function(geometryType) {
return {
"line": 'line-color: #DDD',
'polygon': "polygon-fill: #DDD",
'point': "marker-fill: #DDD"
}[geometryType];
},
_onCardClick: function() {
var self = this;
var dataLayers = this.options.map.layers.getDataLayers();
this.layer = dataLayers[0];
var geometryType = this.model.get("response").geometryType;
var properties = this._geoAttr(geometryType);
if (this.layer) {
this.layer.wizard_properties.unbind("load", this._onLoadWizard, this);
this.layer.wizard_properties.bind("load", this._onLoadWizard, this);
this.layer.wizard_properties.active(this.model.get("response").wizard);
this.layer.wizard_properties.active(this.model.get("response").wizard, properties);
}
this.close();
@ -306,7 +318,7 @@ module.exports = BaseDialog.extend({
},
_onLoadWizard: function() {
this.layer.wizard_properties.set({ property: this.model.get("response").column, metadata: this.model.get("response").metadata });
this.layer.wizard_properties.set({ property: this.model.get("response").column});
},
_analyzeColumns: function() {

Loading…
Cancel
Save