function ZoomManager(sourceCanvas,
                       displayCanvas,
                       brushCanvas,
                       canvasPlaceholder,
                       canvasViewport) {
    /**
     * @type {number}
     */
    this.zoomFactor = 1;

    /**
     * @type {HTMLCanvasElement}
     */
    this.sourceCanvas = sourceCanvas;

    /**
     * @type {HTMLCanvasElement}
     */
    this.displayCanvas = displayCanvas;

    /**
     * @type {HTMLCanvasElement}
     */
    this.brushCanvas = brushCanvas;

    /**
     * @type {HTMLElement}
     * A placeholder for the displayCanvas which sizes to the logical pixel size
     * of the zoomed image.
     */
    this.canvasPlaceholder = canvasPlaceholder;

    /**
     * optionProviders is initialized after zoomManager has been initialized.
     * initialization done in this.setOptionProvders().
     * @type {OptionProviders}
     */
    this.optionProviders = null;

    /**
     * @type {HTMLElement}
     * The element which controls the scrolling and visible region of the
     * displayed image.
     */
    this.canvasViewport = canvasViewport;

    var outer = this;
    canvasViewport.addEventListener(
        'scroll',
        function() { outer.drawDisplayCanvas(); },
        true);

    this.drawDisplayCanvas();
  }
/**
   * Encapsulates data related to the zoom manager.
   * @constructor
   * @struct
   * @param {HTMLCanvasElement} sourceCanvas
   * @param {HTMLCanvasElement} displayCanvas
   * @param {HTMLCanvasElement} brushCanvas
   * @param {HTMLElement} canvasPlaceholder
   * @param {HTMLElement} canvasViewport
   */
Encapsulates data related to the zoom manager.
Encapsulates data related to the zoom manager .
function ZoomManager(sourceCanvas,
                       displayCanvas,
                       brushCanvas,
                       canvasPlaceholder,
                       canvasViewport) {
    this.zoomFactor = 1;
    this.sourceCanvas = sourceCanvas;
    this.displayCanvas = displayCanvas;
    this.brushCanvas = brushCanvas;
    this.canvasPlaceholder = canvasPlaceholder;
    this.optionProviders = null;
    this.canvasViewport = canvasViewport;
    var outer = this;
    canvasViewport.addEventListener(
        'scroll',
        function() { outer.drawDisplayCanvas(); },
        true);
    this.drawDisplayCanvas();
  }
function ZoomManager ( sourceCanvas , displayCanvas , brushCanvas , canvasPlaceholder , canvasViewport ) { this . zoomFactor = 1 ; this . sourceCanvas = sourceCanvas ; this . displayCanvas = displayCanvas ; this . brushCanvas = brushCanvas ; this . canvasPlaceholder = canvasPlaceholder ; this . optionProviders = null ; this . canvasViewport = canvasViewport ; var outer = this ; canvasViewport . addEventListener ( 'scroll' , function ( ) { outer . drawDisplayCanvas ( ) ; } , true ) ; this . drawDisplayCanvas ( ) ; }
Encapsulates data related to the zoom manager.
Encapsulates data related to the zoom manager .
/**
     * @type {number}
     */ /**
     * @type {HTMLCanvasElement}
     */ /**
     * @type {HTMLCanvasElement}
     */ /**
     * @type {HTMLCanvasElement}
     */ /**
     * @type {HTMLElement}
     * A placeholder for the displayCanvas which sizes to the logical pixel size
     * of the zoomed image.
     */ /**
     * optionProviders is initialized after zoomManager has been initialized.
     * initialization done in this.setOptionProvders().
     * @type {OptionProviders}
     */ /**
     * @type {HTMLElement}
     * The element which controls the scrolling and visible region of the
     * displayed image.
     */