| 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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 // Show overwrite original bubble if it hasn't been shown for max times. | 1636 // Show overwrite original bubble if it hasn't been shown for max times. |
| 1637 this.getOverwriteBubbleCount_().then(function(count) { | 1637 this.getOverwriteBubbleCount_().then(function(count) { |
| 1638 if (count >= SlideMode.OVERWRITE_BUBBLE_MAX_TIMES) | 1638 if (count >= SlideMode.OVERWRITE_BUBBLE_MAX_TIMES) |
| 1639 return; | 1639 return; |
| 1640 | 1640 |
| 1641 this.setOverwriteBubbleCount_(count + 1); | 1641 this.setOverwriteBubbleCount_(count + 1); |
| 1642 this.bubble_.hidden = false; | 1642 this.bubble_.hidden = false; |
| 1643 }.bind(this)); | 1643 }.bind(this)); |
| 1644 | 1644 |
| 1645 this.setSubMode_(Gallery.SubMode.EDIT); | 1645 this.setSubMode_(Gallery.SubMode.EDIT); |
| 1646 this.editor_.onStartEditing(); |
| 1646 } else { | 1647 } else { |
| 1647 this.editor_.getPrompt().hide(); | 1648 this.editor_.getPrompt().hide(); |
| 1648 this.editor_.leaveMode(false /* not to switch mode */); | 1649 this.editor_.leaveMode(false /* not to switch mode */); |
| 1649 | 1650 |
| 1650 this.viewport_.setScreenTop(0); | 1651 this.viewport_.setScreenTop(0); |
| 1651 this.viewport_.setScreenBottom(0); | 1652 this.viewport_.setScreenBottom(0); |
| 1652 this.imageView_.applyViewportChange(); | 1653 this.imageView_.applyViewportChange(); |
| 1653 | 1654 |
| 1654 this.bubble_.hidden = true; | 1655 this.bubble_.hidden = true; |
| 1655 | 1656 |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2118 /** | 2119 /** |
| 2119 * Handles mouse up events. | 2120 * Handles mouse up events. |
| 2120 * @param {!Event} event Wheel event. | 2121 * @param {!Event} event Wheel event. |
| 2121 * @private | 2122 * @private |
| 2122 */ | 2123 */ |
| 2123 TouchHandler.prototype.onMouseUp_ = function(event) { | 2124 TouchHandler.prototype.onMouseUp_ = function(event) { |
| 2124 if (event.button !== 0) | 2125 if (event.button !== 0) |
| 2125 return; | 2126 return; |
| 2126 this.clickStarted_ = false; | 2127 this.clickStarted_ = false; |
| 2127 }; | 2128 }; |
| OLD | NEW |