Refactoring

This commit is contained in:
OVSharova 2022-01-13 17:44:20 +03:00
parent 078c7123dd
commit eede2b9b06
2 changed files with 8 additions and 9 deletions

View file

@ -72,15 +72,12 @@ define([
'animation:addanimation': _.bind(this.onAddAnimation, this),
'animation:startselect': _.bind(this.onStartSelect, this),
'animation:checkrewind': _.bind(this.onCheckRewindChange,this),
//'animation:repeat': _.bind(this.onRepeatChange, this),
'animation:additional': _.bind(this.onAnimationAdditional, this),
'animation:trigger': _.bind(this.onTriggerClick, this),
'animation:triggerclickof': _.bind(this.onTriggerClickOfClick, this),
'animation:moveearlier': _.bind(this.onMoveEarlier, this),
'animation:movelater': _.bind(this.onMoveLater, this),
'animation:repeatchangebefore': _.bind(this.onRepeatChange, this),
'animation:repeatchangeafter': _.bind(this.onRepeatChange, this),
'animation:repeatshow': _.bind(this.onRepeatComboOpen, this),
'animation:repeatchange': _.bind(this.onRepeatChange, this),
'animation:repeatfocusin': _.bind(this.onRepeatComboOpen, this),
'animation:repeatselected': _.bind(this.onRepeatSelected, this)
@ -218,9 +215,11 @@ define([
if (!value) {
value = this._state.Repeat;
combo.setRawValue(value);
if(!_.isNumber(record.value))
if(isNaN(record.value)) {
record.value = value;
if(value < 0)
record.displayValue = combo.store.findWhere({value: value}).get('displayValue');
}
return false;
}
}

View file

@ -119,16 +119,16 @@ define([
if (me.cmbRepeat) {
me.cmbRepeat.on('changed:before', function (combo, record) {
me.fireEvent('animation:repeatchangebefore', [true, combo, record]);
me.fireEvent('animation:repeatchange', [true, combo, record]);
}, me);
me.cmbRepeat.on('changed:after', function (combo, record) {
me.fireEvent('animation:repeatchangeafter', [false, combo, record]);
me.fireEvent('animation:repeatchange', [false, combo, record]);
}, me);
me.cmbRepeat.on('selected', function (combo, record) {
me.fireEvent('animation:repeatselected', [combo, record]);
}, me);
me.cmbRepeat.on('show:after', function (combo) {
me.fireEvent('animation:repeatshow', [true, combo]);
me.fireEvent('animation:repeatfocusin', [true, combo]);
}, me);
me.cmbRepeat.on('combo:focusin', function (combo) {
me.fireEvent('animation:repeatfocusin', [false, combo]);