New Feature.
A new bollean input parameter called 'StartAtBeginning' was added to the webblocks.
This parameter when defined as False will not start the count down right away, to start it you will need to r run the ContinueTimer function.
By default, the value is True and the component will behave as it was originally.
Bug fixing
Fixed a bug where the timer was not cleared when navigating to the same page.The reason seems to be that the component onDestroy event destroys the timer of the target screen instead of the source screen. This happens when t because the id of both widget are the same in the source and target screens. And the selector was targeting the target screen.
The solution was to change the selector to consider the source screen first
Bug fixing.
Fixed a bug where the timer was not being cleared on the OnDestroy action.
Now we are calling the same action used in the screen that stops the timer and making sure it will always be cleared.
All the other documentations are still applicable.
Fixed OnDestroy not being called because of a parse error.The Calculate action inside a javascript node was trying to assign a number in the string format to an output variable of type integer without doing a parse.This generated an error and impacted the OnDestroy action of the webblock
You will find as part of this component 2 main webblocks.
One is the Chart View which gives a circular chart with a percentage count down:
The other is a text view that shows days, hours, minutes and seconds:
The attributes are self explanatory.
Both web blocks have:
- SecondsToExpire: which is the amount of seconds the countdown will have.
- SteppingMs: value in Miliseconds the calculation should run. Default to 1000 which is 1 second. It is helpfull to decrease it if you want to make the chart update more often for example.
On the text webblock you will find some other options that are specific to the text elements.
You can define if you want to show all elements or just some of them.
For example, only the hours and minutes.
You can also define the separators or suffixes you want to place after each element.
Besides the elements you will find a set of actions to help you to stop, continue and restart the timers:
To use these actions you simply have to pass the Timer Container Id, which is returned by the webblock on the OnInitialize event:
This version allows multiple timers in the same screen running together.