Browse Source

Avoid default value in property view

up-style-manager
Artur Arseniev 5 years ago
parent
commit
6a9f8640fd
  1. 2
      src/style_manager/model/PropertyFactory.js
  2. 4
      src/style_manager/view/PropertyView.js

2
src/style_manager/model/PropertyFactory.js

@ -176,7 +176,7 @@ export default class PropertyFactory {
['box-shadow-v', {}, 'text-shadow-h'],
['box-shadow-blur', { default: '5px' }, 'text-shadow-blur'],
['box-shadow-spread', {}, 'text-shadow-h'],
['transition-duration', { default: '2', units: this.unitsTime }, 'border-radius-c'],
['transition-duration', { default: '2s', units: this.unitsTime }, 'border-radius-c'],
['perspective', {}, 'border-radius-c'],
['transform-rotate-x', { functionName: 'rotateX', units: this.unitsAngle, default: '0', type: typeNumber }],
['transform-rotate-y', { functionName: 'rotateY' }, 'transform-rotate-x'],

4
src/style_manager/view/PropertyView.js

@ -65,10 +65,6 @@ export default Backbone.View.extend({
this.__destroyFn = this.destroy ? this.destroy.bind(this) : () => {};
model.view = this;
if (!model.get('value')) {
model.set('value', model.getDefaultValue());
}
if (em) {
this.listenTo(em, `update:component:style:${this.property}`, this.targetUpdated);
//this.listenTo(em, `styleable:change:${this.property}`, this.targetUpdated);

Loading…
Cancel
Save