Browse Source

Replace getValue with getFullValue within view properties

pull/312/head
Artur Arseniev 9 years ago
parent
commit
496f46163f
  1. 14
      src/style_manager/view/PropertyCompositeView.js
  2. 8
      src/style_manager/view/PropertyStackView.js
  3. 7
      src/style_manager/view/PropertyView.js

14
src/style_manager/view/PropertyCompositeView.js

@ -130,16 +130,10 @@ module.exports = PropertyView.extend({
* @return {string}
* */
build(selectedEl, propertyView, opts) {
var result = '';
this.model.get('properties').each(prop => {
var v = prop.getValue();
var func = prop.get('functionName');
if(func)
v = func + '(' + v + ')';
result += v + ' ';
});
let result = '';
this.model.get('properties').each(prop =>
result += `${prop.getFullValue()} `
);
return result.replace(/ +$/,'');
},

8
src/style_manager/view/PropertyStackView.js

@ -143,14 +143,10 @@ module.exports = PropertyCompositeView.extend({
return;
// Store properties values inside layer, in this way it's more reliable
// to fetch them later
// to fetch them later
var valObj = {};
this.model.get('properties').each(prop => {
var v = prop.getValue(),
func = prop.get('functionName');
if(func)
v = func + '(' + v + ')';
valObj[prop.get('property')] = v;
valObj[prop.get('property')] = prop.getFullValue();
});
model.set('values', valObj);

7
src/style_manager/view/PropertyView.js

@ -372,12 +372,7 @@ module.exports = Backbone.View.extend({
return;
}
var value = this.getValueForTarget();
var func = model.get('functionName');
if(func)
value = func + '(' + value + ')';
const value = this.model.getFullValue();
var target = this.getTarget();
var onChange = this.onChange;

Loading…
Cancel
Save