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} * @return {string}
* */ * */
build(selectedEl, propertyView, opts) { build(selectedEl, propertyView, opts) {
var result = ''; let result = '';
this.model.get('properties').each(prop => { this.model.get('properties').each(prop =>
var v = prop.getValue(); result += `${prop.getFullValue()} `
var func = prop.get('functionName'); );
if(func)
v = func + '(' + v + ')';
result += v + ' ';
});
return result.replace(/ +$/,''); return result.replace(/ +$/,'');
}, },

8
src/style_manager/view/PropertyStackView.js

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

7
src/style_manager/view/PropertyView.js

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

Loading…
Cancel
Save