Chromium Code Reviews| 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 911 } | 911 } |
| 912 | 912 |
| 913 // If the saved selection is multiple the Slideshow should cycle through | 913 // If the saved selection is multiple the Slideshow should cycle through |
| 914 // the saved selection. | 914 // the saved selection. |
| 915 if (this.isSlideshowOn_() && | 915 if (this.isSlideshowOn_() && |
| 916 this.savedSelection_ && this.savedSelection_.length > 1) { | 916 this.savedSelection_ && this.savedSelection_.length > 1) { |
| 917 var pos = advance(this.savedSelection_.indexOf(this.getSelectedIndex()), | 917 var pos = advance(this.savedSelection_.indexOf(this.getSelectedIndex()), |
| 918 this.savedSelection_.length); | 918 this.savedSelection_.length); |
| 919 return this.savedSelection_[pos]; | 919 return this.savedSelection_[pos]; |
| 920 } else { | 920 } else { |
| 921 if(this.getSelectedIndex() == -1) | |
| 922 return -1; | |
|
harukam1
2016/08/09 07:18:57
"slideshowButton" icon shows because selectedIndex
fukino
2016/08/09 07:49:18
It's weird that selectionModel_.selectedIndexes.le
harukam1
2016/08/10 04:34:47
We have decided to modify advanceWithKeyboard meth
| |
| 921 return advance(this.getSelectedIndex(), this.getItemCount_()); | 923 return advance(this.getSelectedIndex(), this.getItemCount_()); |
| 922 } | 924 } |
| 923 }; | 925 }; |
| 924 | 926 |
| 925 /** | 927 /** |
| 926 * Advance the selection based on the pressed key ID. | 928 * Advance the selection based on the pressed key ID. |
| 927 * @param {string} keyID Key of the KeyboardEvent. | 929 * @param {string} keyID Key of the KeyboardEvent. |
| 928 */ | 930 */ |
| 929 SlideMode.prototype.advanceWithKeyboard = function(keyID) { | 931 SlideMode.prototype.advanceWithKeyboard = function(keyID) { |
| 930 var prev = (keyID === 'ArrowUp' || | 932 var prev = (keyID === 'ArrowUp' || |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2133 /** | 2135 /** |
| 2134 * Handles mouse up events. | 2136 * Handles mouse up events. |
| 2135 * @param {!Event} event Wheel event. | 2137 * @param {!Event} event Wheel event. |
| 2136 * @private | 2138 * @private |
| 2137 */ | 2139 */ |
| 2138 TouchHandler.prototype.onMouseUp_ = function(event) { | 2140 TouchHandler.prototype.onMouseUp_ = function(event) { |
| 2139 if (event.button !== 0) | 2141 if (event.button !== 0) |
| 2140 return; | 2142 return; |
| 2141 this.clickStarted_ = false; | 2143 this.clickStarted_ = false; |
| 2142 }; | 2144 }; |
| OLD | NEW |