()
| 133 | |
| 134 | // stop the bar |
| 135 | stop(){ |
| 136 | // set flag |
| 137 | this.isActive = false; |
| 138 | |
| 139 | // store stop timestamp to get total duration |
| 140 | this.stopTime = Date.now(); |
| 141 | |
| 142 | // stop event |
| 143 | this.emit('stop', this.total, this.value); |
| 144 | } |
| 145 | |
| 146 | // update the bar value |
| 147 | // update(value, payload) |