Skip to content

Commit

Permalink
Make integer property more extendable. Closes #2360
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Nov 2, 2019
1 parent 7a23e20 commit 2828da8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/style_manager/model/PropertyInteger.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export default Property.extend({
max: ''
},

init() {
initialize(props = {}, opts = {}) {
Property.callParentInit(Property, this, props, opts);
const unit = this.get('unit');
const units = this.get('units');
this.input = new InputNumber({ model: this });

if (units.length && !unit) {
this.set('unit', units[0]);
}
Property.callInit(this, props, opts);
},

clearValue(opts = {}) {
Expand Down

0 comments on commit 2828da8

Please sign in to comment.