Browse Source

Fix preview issue inside Style Manager

pull/36/head
Artur Arseniev 10 years ago
parent
commit
b8c5b75502
  1. 18
      src/style_manager/model/Layer.js
  2. 2
      src/style_manager/view/PropertyStackView.js

18
src/style_manager/model/Layer.js

@ -9,7 +9,23 @@ define(['backbone'],
value: '',
values: {},
preview: false,
}
},
initialize: function(){
var value = this.get('value');
// If there is no value I'll try to get it from values
// I need value setted to make preview working
if(!value){
var val = '';
var values = this.get('values');
for(var prop in values)
val += ' ' + values[prop];
this.set('value', val.trim());
}
},
});
});

2
src/style_manager/view/PropertyStackView.js

@ -264,7 +264,7 @@ define(['backbone','./PropertyCompositeView', 'text!./../templates/propertyStack
a = v.split(', ');
}
}
_.each(a,function(e){
_.each(a, function(e){
var o = {};
o[fieldName] = e;
n.push(o);

Loading…
Cancel
Save