OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 this, SlideMode.SLIDESHOW_INTERVAL, opt_event)); | 1045 this, SlideMode.SLIDESHOW_INTERVAL, opt_event)); |
1046 return; | 1046 return; |
1047 } | 1047 } |
1048 | 1048 |
1049 if (opt_event) // Caused by user action, notify the Gallery. | 1049 if (opt_event) // Caused by user action, notify the Gallery. |
1050 cr.dispatchSimpleEvent(this, 'useraction'); | 1050 cr.dispatchSimpleEvent(this, 'useraction'); |
1051 | 1051 |
1052 this.fullscreenBeforeSlideshow_ = util.isFullScreen(); | 1052 this.fullscreenBeforeSlideshow_ = util.isFullScreen(); |
1053 if (!this.fullscreenBeforeSlideshow_) { | 1053 if (!this.fullscreenBeforeSlideshow_) { |
1054 // Wait until the zoom animation from the mosaic mode is done. | 1054 // Wait until the zoom animation from the mosaic mode is done. |
1055 setTimeout(this.toggleFullscreen_.bind(this), | 1055 setTimeout(this.toggleFullScreen_.bind(this), |
1056 ImageView.ZOOM_ANIMATION_DURATION); | 1056 ImageView.ZOOM_ANIMATION_DURATION); |
1057 opt_interval = (opt_interval || SlideMode.SLIDESHOW_INTERVAL) + | 1057 opt_interval = (opt_interval || SlideMode.SLIDESHOW_INTERVAL) + |
1058 SlideMode.FULLSCREEN_TOGGLE_DELAY; | 1058 SlideMode.FULLSCREEN_TOGGLE_DELAY; |
1059 } | 1059 } |
1060 | 1060 |
1061 this.resumeSlideshow_(opt_interval); | 1061 this.resumeSlideshow_(opt_interval); |
1062 }; | 1062 }; |
1063 | 1063 |
1064 /** | 1064 /** |
1065 * Stop the slideshow. | 1065 * Stop the slideshow. |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 done = true; | 1273 done = true; |
1274 } | 1274 } |
1275 }.bind(this); | 1275 }.bind(this); |
1276 }; | 1276 }; |
1277 | 1277 |
1278 /** | 1278 /** |
1279 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD | 1279 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD |
1280 * horizontally it's considered as a swipe gesture (change the current image). | 1280 * horizontally it's considered as a swipe gesture (change the current image). |
1281 */ | 1281 */ |
1282 SwipeOverlay.SWIPE_THRESHOLD = 100; | 1282 SwipeOverlay.SWIPE_THRESHOLD = 100; |
OLD | NEW |