| 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 'use strict'; | |
| 6 | |
| 7 /** | 5 /** |
| 8 * 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 |
| 9 * between the images and to edit an image. | 7 * between the images and to edit an image. |
| 10 * | 8 * |
| 11 * @param {Element} container Main container element. | 9 * @param {Element} container Main container element. |
| 12 * @param {Element} content Content container element. | 10 * @param {Element} content Content container element. |
| 13 * @param {Element} toolbar Toolbar element. | 11 * @param {Element} toolbar Toolbar element. |
| 14 * @param {ImageEditor.Prompt} prompt Prompt. | 12 * @param {ImageEditor.Prompt} prompt Prompt. |
| 15 * @param {ErrorBanner} errorBanner Error banner. | 13 * @param {ErrorBanner} errorBanner Error banner. |
| 16 * @param {cr.ui.ArrayDataModel} dataModel Data model. | 14 * @param {cr.ui.ArrayDataModel} dataModel Data model. |
| (...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 TouchHandler.prototype.onMouseWheel_ = function(event) { | 1560 TouchHandler.prototype.onMouseWheel_ = function(event) { |
| 1563 var viewport = this.slideMode_.getViewport(); | 1561 var viewport = this.slideMode_.getViewport(); |
| 1564 if (!this.enabled_ || !viewport.isZoomed()) | 1562 if (!this.enabled_ || !viewport.isZoomed()) |
| 1565 return; | 1563 return; |
| 1566 this.stopOperation(); | 1564 this.stopOperation(); |
| 1567 viewport.setOffset( | 1565 viewport.setOffset( |
| 1568 viewport.getOffsetX() + event.wheelDeltaX, | 1566 viewport.getOffsetX() + event.wheelDeltaX, |
| 1569 viewport.getOffsetY() + event.wheelDeltaY); | 1567 viewport.getOffsetY() + event.wheelDeltaY); |
| 1570 this.slideMode_.applyViewportChange(); | 1568 this.slideMode_.applyViewportChange(); |
| 1571 }; | 1569 }; |
| OLD | NEW |