Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.     increase() {
  3.         if (this._value < this.defaultMaxValues[this._isUnitTotal]) {
  4.  
  5.             const value = this.correctValueDefaultRang(this._value + 1);
  6.             this.writeValue(value);
  7.  
  8.             if (this.onChangeCallback) {
  9.                 this.onChangeCallback();
  10.             }
  11.  
  12.             this.valueChange.emit(this._value);
  13.         }
  14.     }
  15.  
  16.     decrease() {
  17.  
  18.         if (this._value > this._min) {
  19.  
  20.             const value = this.correctValueDefaultRang(this._value - 1);
  21.             this.writeValue(value);
  22.  
  23.             if (this.onChangeCallback) {
  24.                 this.onChangeCallback();
  25.             }
  26.  
  27.             this.valueChange.emit(this._value);
  28.         }
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement