The current pacing timer operates on the assumption that there is
a default amount of time to be allocated to each slide, and that
individual slides can deviate from that default by specifying their
own data-timing attribute.
This patch introduces an alternate pacing method: by specifying
the totalTime configuration option, the presenter can set the total
time available to present. The pacing timer will then continue to
allocate the exact pacing time for slides that do have data-timing
set, as before. However, rather than applying the defaultTiming
constant to all others, it will
- Add up the time already allocated to slides via data-timing;
- subtract that from totalTime;
- divide the difference by the number of slides without data-timing set;
- apply the thus-calculated average to those slides.
totalTime has no default, and if both defaultTiming and totalTime are
set, totalTime wins. This preserves backward compatibility: if a
presenter has set defaultTiming and updates reveal.js, totalTime will
be null and defaultTiming is still applied to all slides without a
data-timing attribute. The presenter can then switch to the automatic
calculation, if desired, by setting a value for totalTime.
Add an option to display advice on whether the current pace of the
presentation is on track for the right timing (shown as green), and if
not, whether the presenter should speed up (shown as red) or has the
luxury of slowing down (blue).
The pacing timer can be enabled by configuring by the `defaultTiming`
parameter in the `Reveal` configuration block, which specifies the
number of seconds per slide. 120 can be a reasonable rule of thumb.
Timings can also be given per slide `<section>` by setting the
`data-timing` attribute. Both values are in numbers of seconds.
When the option is enabled, clicking on the timers will reset the timer
to the beginning of the current slide, i.e. as if pacing was perfectly
on track, not to zero as if the presentation had just begun.
Resolves an issue where the first label (e.g., first bullet or first
number) of a list would wrap to the right side of the window and be
hidden under the clock element.