Skip to content

Commit

Permalink
Adding new parameter (#85)
Browse files Browse the repository at this point in the history
* Adding new parameter

* Adding new parameter
  • Loading branch information
Psychosynthesis authored and walmik committed Nov 26, 2018
1 parent 2aadb66 commit 50ffc31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -56,6 +56,7 @@ $("#div-id").timer({
repeat: {Bool}, // If duration is set, `callback` will be called repeatedly
format: {String}, // Format to show time in
editable: {Bool} // If click and edit time is enabled
hidden; {Bool} // If true, the timer is not displayed in the selected item.
});
```

Expand Down
4 changes: 3 additions & 1 deletion src/Timer.js
Expand Up @@ -59,7 +59,9 @@ function Timer(element, config) {
Timer.prototype.start = function() {
if (this.state !== Constants.TIMER_RUNNING) {
utils.setState(this, Constants.TIMER_RUNNING);
this.render();
if (this.config.hidden !== true) {
this.render();
}
this.intervalId = setInterval(utils.intervalHandler.bind(null, this), this.config.updateFrequency);
}
};
Expand Down

0 comments on commit 50ffc31

Please sign in to comment.