react-compound-timer
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -31,3 +31,3 @@ import { TimeParts, Checkpoint, Direction, TimerValue, Unit } from '../../types'; | ||
start(): void; | ||
resume(): void; | ||
resume(callImmediately?: boolean): void; | ||
pause(): void; | ||
@@ -34,0 +34,0 @@ stop(): void; |
@@ -47,3 +47,5 @@ "use strict"; | ||
TimerModel.prototype.setLastUnit = function (lastUnit) { | ||
this.pause(); | ||
this.lastUnit = lastUnit; | ||
this.resume(true); | ||
}; | ||
@@ -66,5 +68,6 @@ TimerModel.prototype.setTimeToUpdate = function (interval) { | ||
}; | ||
TimerModel.prototype.resume = function () { | ||
TimerModel.prototype.resume = function (callImmediately) { | ||
if (callImmediately === void 0) { callImmediately = false; } | ||
if (!this.innerState.isStopped() && this.innerState.setPlaying()) { | ||
this.setTimerInterval(); | ||
this.setTimerInterval(callImmediately); | ||
} | ||
@@ -71,0 +74,0 @@ }; |
{ | ||
"name": "react-compound-timer", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "Timer compound react component", | ||
@@ -5,0 +5,0 @@ "main": "build", |
@@ -68,3 +68,5 @@ import getTimeParts from '../helpers/getTimeParts'; | ||
public setLastUnit(lastUnit: Unit) { | ||
this.pause(); | ||
this.lastUnit = lastUnit; | ||
this.resume(true); | ||
} | ||
@@ -92,5 +94,5 @@ | ||
public resume() { | ||
public resume(callImmediately = false) { | ||
if (!this.innerState.isStopped() && this.innerState.setPlaying()) { | ||
this.setTimerInterval(); | ||
this.setTimerInterval(callImmediately); | ||
} | ||
@@ -97,0 +99,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83060
1615