| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Slide mode displays a single image and has a set of controls to navigate | 6 * Slide mode displays a single image and has a set of controls to navigate |
| 7 * between the images and to edit an image. | 7 * between the images and to edit an image. |
| 8 * | 8 * |
| 9 * @param {!HTMLElement} container Main container element. | 9 * @param {!HTMLElement} container Main container element. |
| 10 * @param {!HTMLElement} content Content container element. | 10 * @param {!HTMLElement} content Content container element. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 this.context_ = context; | 92 this.context_ = context; |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * @type {!VolumeManager} | 95 * @type {!VolumeManager} |
| 96 * @private | 96 * @private |
| 97 * @const | 97 * @const |
| 98 */ | 98 */ |
| 99 this.volumeManager_ = volumeManager; | 99 this.volumeManager_ = volumeManager; |
| 100 | 100 |
| 101 /** | 101 /** |
| 102 * @type {!MetadataCache} | |
| 103 * @private | |
| 104 * @const | |
| 105 */ | |
| 106 this.metadataCache_ = context.metadataCache; | |
| 107 | |
| 108 /** | |
| 109 * @type {function(function())} | 102 * @type {function(function())} |
| 110 * @private | 103 * @private |
| 111 * @const | 104 * @const |
| 112 */ | 105 */ |
| 113 this.toggleMode_ = toggleMode; | 106 this.toggleMode_ = toggleMode; |
| 114 | 107 |
| 115 /** | 108 /** |
| 116 * @type {function(string):string} | 109 * @type {function(string):string} |
| 117 * @private | 110 * @private |
| 118 * @const | 111 * @const |
| (...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 var event = assertInstanceof(event, MouseEvent); | 1862 var event = assertInstanceof(event, MouseEvent); |
| 1870 var viewport = this.slideMode_.getViewport(); | 1863 var viewport = this.slideMode_.getViewport(); |
| 1871 if (!this.enabled_ || !viewport.isZoomed()) | 1864 if (!this.enabled_ || !viewport.isZoomed()) |
| 1872 return; | 1865 return; |
| 1873 this.stopOperation(); | 1866 this.stopOperation(); |
| 1874 viewport.setOffset( | 1867 viewport.setOffset( |
| 1875 viewport.getOffsetX() + event.wheelDeltaX, | 1868 viewport.getOffsetX() + event.wheelDeltaX, |
| 1876 viewport.getOffsetY() + event.wheelDeltaY); | 1869 viewport.getOffsetY() + event.wheelDeltaY); |
| 1877 this.slideMode_.applyViewportChange(); | 1870 this.slideMode_.applyViewportChange(); |
| 1878 }; | 1871 }; |
| OLD | NEW |