function mouseZoom(ticks) {
  var scrollbarStartedAtEnd =
      (scrollbar().getRange() == scrollbar().getPosition());

  var event = new WheelEvent('mousewheel', {deltaX: 0, deltaY: -ticks});
  canvas().dispatchEvent(event);

  // If the scrollbar started at the end of the range, make sure it ends there
  // as well.
  if (scrollbarStartedAtEnd)
    expectEquals(scrollbar().getRange(), scrollbar().getPosition());

  sanityCheck();
}
/**
 * Simulates mouse wheel movement over the canvas element.
 * @param {number} ticks Number of mouse wheel ticks to simulate.
 */
Simulates mouse wheel movement over the canvas element.
@param {number} ticks Number of mouse wheel ticks to simulate.
Simulates mouse wheel movement over the canvas element . @param { number } ticks Number of mouse wheel ticks to simulate .
function mouseZoom(ticks) {
  var scrollbarStartedAtEnd =
      (scrollbar().getRange() == scrollbar().getPosition());
  var event = new WheelEvent('mousewheel', {deltaX: 0, deltaY: -ticks});
  canvas().dispatchEvent(event);
  if (scrollbarStartedAtEnd)
    expectEquals(scrollbar().getRange(), scrollbar().getPosition());
  sanityCheck();
}
function mouseZoom ( ticks ) { var scrollbarStartedAtEnd = ( scrollbar ( ) . getRange ( ) == scrollbar ( ) . getPosition ( ) ) ; var event = new WheelEvent ( 'mousewheel' , { deltaX : 0 , deltaY : - ticks } ) ; canvas ( ) . dispatchEvent ( event ) ; if ( scrollbarStartedAtEnd ) expectEquals ( scrollbar ( ) . getRange ( ) , scrollbar ( ) . getPosition ( ) ) ; sanityCheck ( ) ; }
Simulates mouse wheel movement over the canvas element.
Simulates mouse wheel movement over the canvas element .
// If the scrollbar started at the end of the range, make sure it ends there // as well.