Commit fd6687a5 authored by wildfirecode13's avatar wildfirecode13

1

parent 8610a80e
......@@ -70,6 +70,7 @@ var Countdown = /** @class */ (function (_super) {
this.emit("complete");
};
Countdown.prototype.reset = function ($seconds) {
this._counter = 0;
this._seconds = $seconds;
};
Object.defineProperty(Countdown.prototype, "running", {
......
{
"name": "teddi",
"version": "1.0.5",
"version": "1.0.6",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
......
......@@ -6,7 +6,7 @@ function getNum(n: any) {
export default class Countdown extends EventEmitter<any> {
private _timer: any;
private _text: any;
private _text: any;
private _seconds: any;
private _format: any;
private _counter: any;
......@@ -27,7 +27,7 @@ export default class Countdown extends EventEmitter<any> {
if (this._format == "mmss") return this.getMMSS();
}
private getHHMMSS() {
private getHHMMSS() {
const left = this._seconds - this._counter;
const hours = Math.floor(left / 3600);
const minutes = Math.floor((left % 3600) / 60);
......@@ -65,12 +65,13 @@ export default class Countdown extends EventEmitter<any> {
}
reset($seconds: number) {
this._counter = 0;
this._seconds = $seconds;
}
// set seconds(val: number) {
// this._seconds = val;
// }
// set seconds(val: number) {
// this._seconds = val;
// }
get running() {
return this._running;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment