Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
teddi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
teddi
Commits
fd6687a5
Commit
fd6687a5
authored
Nov 12, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8610a80e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
Countdown.js
dist/Countdown.js
+1
-0
package.json
package.json
+1
-1
Countdown.ts
src/Countdown.ts
+6
-5
No files found.
dist/Countdown.js
View file @
fd6687a5
...
...
@@ -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"
,
{
...
...
package.json
View file @
fd6687a5
{
"name"
:
"teddi"
,
"version"
:
"1.0.
5
"
,
"version"
:
"1.0.
6
"
,
"description"
:
""
,
"main"
:
"dist/index.js"
,
"types"
:
"dist/index.d.ts"
,
...
...
src/Countdown.ts
View file @
fd6687a5
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment