Module: PomoTimerHelpers

Methods

(static) display(totalSeconds, timerText, calmTimerText)

Uses the total seconds to split into minutes and seconds and display on screen
Parameters:
Name Type Description
totalSeconds Number current total number of seconds on timer
timerText String text for current time on timer
calmTimerText Boolean true if should only display min; false for min : sec
Source:

(static) initProgess() → {Array}

Creates a div, progressContainer, with an upper and lower div (Sections). Creates 4 squares (and spaces) that live in the lower div to represent break progress
Source:
Returns:
container for progress elements to append to shadow and individual squares (for styling)
Type
Array

(static) setProgressHelper(progress, square1, square2, square3, square4)

Updates the colors of the squares to match number of breaks
Parameters:
Name Type Description
progress Number [0,4] that represents number of breaks taken
square1 Object a square shape (created by initProgress)
square2 Object a square shape (created by initProgress)
square3 Object a square shape (created by initProgress)
square4 Object a square shape (created by initProgress)
Source:

(static) setResetButton(timerButton)

Changes button to represent Reset
Parameters:
Name Type Description
timerButton Button button for Start/Reset timer
Source:

(static) setStartButton(timerButton)

Changes button to represent Start
Parameters:
Name Type Description
timerButton Button button for Start/Reset timer
Source:

(static) setTime(m) → {Number}

Depending on the minutes given, will set the total seconds of timer appropriately
Parameters:
Name Type Description
m Number Minutes for the timer to run
Source:
Returns:
totalSeconds
Type
Number