Customize text
Closed this issue · 3 comments
cravenbrave commented
Hello! Thanks for writing such great extension.
I was wondering whether you could add a feature that I can customize the text during count down (in the center of the circle)?
Thank you again!
JesusHdez960717 commented
solved with pull request #35
MuhammadUsamaSiddiqui commented
Sorry, somehow I missed that Pull Request. As Pull request is closed and the request branch is deleted. Therefore, I have added this functionality manually according to the updated code. Thanks @JesusHdezWaterloo for your contribution.
/*
* Function to format the text.
* Allows you to format the current duration to any String.
* It also provides the default function in case you want to format specific moments
as in reverse when reaching '0' show 'GO', and for the rest of the instances follow
the default behavior.
*/
timeFormatterFunction: (defaultFormatterFunction, duration) {
if (duration.inSeconds == 0) {
// only format for '0'
return "Start";
} else {
// other durations by it's default format
return Function.apply(defaultFormatterFunction, [duration]);
}
},