src/TimerSelectionMixin.js
function updateTimer(element) {
  // If the element is playing and we haven't started a timer yet, do so now.
  // Also, if the element's selectedIndex changed for any reason, restart the
  // timer. This ensures that the timer restarts no matter why the selection
  // changes: it could have been us moving to the next slide because the timer
  // elapsed, or the user might have directly manipulated the selection, etc.
  if (element.state.playing &&
      (!element.state.timerTimeout || element.state.selectedIndex !== element.state.selectedIndexForTimer)) {
    restartTimer(element);
  } else if (!element.state.playing && element.state.timerTimeout) {
    clearTimer(element);
  }
}
function updateTimer(element) {
  // If the element is playing and we haven't started a timer yet, do so now.
  // Also, if the element's selectedIndex changed for any reason, restart the
  // timer. This ensures that the timer restarts no matter why the selection
  // changes: it could have been us moving to the next slide because the timer
  // elapsed, or the user might have directly manipulated the selection, etc.
  if (element.state.playing &&
      (!element.state.timerTimeout || element.state.selectedIndex !== element.state.selectedIndexForTimer)) {
    restartTimer(element);
  } else if (!element.state.playing && element.state.timerTimeout) {
    clearTimer(element);
  }
}
function updateTimer ( element ) { // If the element is playing and we haven't started a timer yet, do so now. // Also, if the element's selectedIndex changed for any reason, restart the // timer. This ensures that the timer restarts no matter why the selection // changes: it could have been us moving to the next slide because the timer // elapsed, or the user might have directly manipulated the selection, etc. if ( element . state . playing && ( ! element . state . timerTimeout || element . state . selectedIndex !== element . state . selectedIndexForTimer ) ) { restartTimer ( element ) ; } else if ( ! element . state . playing && element . state . timerTimeout ) { clearTimer ( element ) ; } }
Update the timer to match the element's `playing` state.
Update the timer to match the element s playing state .