Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
799 B

var PropertyView = require('./PropertyView');
var InputNumber = require('domain_abstract/ui/InputNumber');
module.exports = PropertyView.extend({
initialize(options) {
PropertyView.prototype.initialize.apply(this, arguments);
this.listenTo(this.model, 'change:unit', this.valueChanged);
this.listenTo(this.model, 'el:change', this.elementUpdated);
},
renderInput() {
if (!this.input) {
var inputNumber = new InputNumber({
model: this.model,
ppfx: this.ppfx
});
this.input = inputNumber.render();
this.$el.append(this.input.$el);
this.$input = this.input.inputEl;
this.$unit = this.input.unitEl;
}
this.setValue(this.componentValue);
},
setValue(value) {
this.input.setValue(value, {silent: 1});
},
});