Browse Source

Fix integer property store options

pull/36/head
Artur Arseniev 10 years ago
parent
commit
de98bb93b9
  1. 1
      src/editor/model/Editor.js
  2. 2
      src/style_manager/view/PropertyCompositeView.js
  3. 2
      src/style_manager/view/PropertyIntegerView.js
  4. 2
      src/style_manager/view/PropertyStackView.js

1
src/editor/model/Editor.js

@ -100,7 +100,6 @@ define([
this.cssc = new CssComposer(cfg);
this.CssComposer = this.cssc;
this.set('CssComposer', this.cssc);
console.log(this.cssc.getRules());
if(this.stm.isAutosave())
this.listenRules(this.cssc.getRules());
},

2
src/style_manager/view/PropertyCompositeView.js

@ -71,7 +71,7 @@ define(['backbone','./PropertyView', 'text!./../templates/propertyComposite.html
// On any change made to children I need to update composite value
onChange: function(el, view, opts){
var result = that.build();
that.model.set('value', result);
that.model.set('value', result, opts);
},
// Each child property will receive a full composite string, eg. '0px 0px 10px 0px'
// I need to extract from that string the corresponding one to that property.

2
src/style_manager/view/PropertyIntegerView.js

@ -107,7 +107,7 @@ define(['backbone','./PropertyView', 'text!./../templates/propertyInteger.html']
this.moved = 1;
var pos = parseInt(ev.data.val - ev.pageY + ev.data.y, 10);
this.prValue = this.validateValue(pos);//Math.max(this.min, Math.min(this.max, pos) );
this.model.set( 'value', this.prValue, { avoidStore: 1 });
this.model.set('value', this.prValue, { avoidStore: 1 });
return false;
},

2
src/style_manager/view/PropertyStackView.js

@ -80,7 +80,7 @@ define(['backbone','./PropertyCompositeView', 'text!./../templates/propertyStack
});
view.updateTargetStyle(propVal, null, opt);
}else
that.model.set('value', result);
that.model.set('value', result, opt);
};
return result;

Loading…
Cancel
Save