| 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'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Slide mode displays a single image and has a set of controls to navigate | 8 * Slide mode displays a single image and has a set of controls to navigate |
| 9 * between the images and to edit an image. | 9 * between the images and to edit an image. |
| 10 * | 10 * |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 case 'Left': | 862 case 'Left': |
| 863 case 'Right': | 863 case 'Right': |
| 864 case 'MediaNextTrack': | 864 case 'MediaNextTrack': |
| 865 case 'MediaPreviousTrack': | 865 case 'MediaPreviousTrack': |
| 866 this.advanceWithKeyboard(keyID); | 866 this.advanceWithKeyboard(keyID); |
| 867 break; | 867 break; |
| 868 | 868 |
| 869 case 'Ctrl-U+00BB': // Ctrl+'=' zoom in. | 869 case 'Ctrl-U+00BB': // Ctrl+'=' zoom in. |
| 870 if (!this.isEditing()) { | 870 if (!this.isEditing()) { |
| 871 this.viewport_.setZoomIndex(this.viewport_.getZoomIndex() + 1); | 871 this.viewport_.setZoomIndex(this.viewport_.getZoomIndex() + 1); |
| 872 this.imageView_.draw(); | 872 this.imageView_.applyViewportChange(); |
| 873 } | 873 } |
| 874 break; | 874 break; |
| 875 | 875 |
| 876 case 'Ctrl-U+00BD': // Ctrl+'-' zoom out. | 876 case 'Ctrl-U+00BD': // Ctrl+'-' zoom out. |
| 877 if (!this.isEditing()) { | 877 if (!this.isEditing()) { |
| 878 this.viewport_.setZoomIndex(this.viewport_.getZoomIndex() - 1); | 878 this.viewport_.setZoomIndex(this.viewport_.getZoomIndex() - 1); |
| 879 this.imageView_.draw(); | 879 this.imageView_.applyViewportChange(); |
| 880 } | 880 } |
| 881 break; | 881 break; |
| 882 } | 882 } |
| 883 | 883 |
| 884 return true; | 884 return true; |
| 885 }; | 885 }; |
| 886 | 886 |
| 887 /** | 887 /** |
| 888 * Resize handler. | 888 * Resize handler. |
| 889 * @private | 889 * @private |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 done = true; | 1292 done = true; |
| 1293 } | 1293 } |
| 1294 }.bind(this); | 1294 }.bind(this); |
| 1295 }; | 1295 }; |
| 1296 | 1296 |
| 1297 /** | 1297 /** |
| 1298 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD | 1298 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD |
| 1299 * horizontally it's considered as a swipe gesture (change the current image). | 1299 * horizontally it's considered as a swipe gesture (change the current image). |
| 1300 */ | 1300 */ |
| 1301 SwipeOverlay.SWIPE_THRESHOLD = 100; | 1301 SwipeOverlay.SWIPE_THRESHOLD = 100; |
| OLD | NEW |