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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 }); | 922 }); |
923 }; | 923 }; |
924 | 924 |
925 /** | 925 /** |
926 * Update caches when the selected item has been renamed. | 926 * Update caches when the selected item has been renamed. |
927 * @param {Event} event Event. | 927 * @param {Event} event Event. |
928 * @private | 928 * @private |
929 */ | 929 */ |
930 SlideMode.prototype.onContentChange_ = function(event) { | 930 SlideMode.prototype.onContentChange_ = function(event) { |
931 var newEntry = event.item.getEntry(); | 931 var newEntry = event.item.getEntry(); |
932 if (util.isSameEntry(newEntry, event.oldEntry)) | 932 if (!util.isSameEntry(newEntry, event.oldEntry)) |
933 this.imageView_.changeEntry(newEntry); | 933 this.imageView_.changeEntry(newEntry); |
934 }; | 934 }; |
935 | 935 |
936 /** | 936 /** |
937 * Flash 'Saved' label briefly to indicate that the image has been saved. | 937 * Flash 'Saved' label briefly to indicate that the image has been saved. |
938 * @private | 938 * @private |
939 */ | 939 */ |
940 SlideMode.prototype.flashSavedLabel_ = function() { | 940 SlideMode.prototype.flashSavedLabel_ = function() { |
941 var setLabelHighlighted = | 941 var setLabelHighlighted = |
942 ImageUtil.setAttribute.bind(null, this.savedLabel_, 'highlighted'); | 942 ImageUtil.setAttribute.bind(null, this.savedLabel_, 'highlighted'); |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 done = true; | 1262 done = true; |
1263 } | 1263 } |
1264 }.bind(this); | 1264 }.bind(this); |
1265 }; | 1265 }; |
1266 | 1266 |
1267 /** | 1267 /** |
1268 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD | 1268 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD |
1269 * horizontally it's considered as a swipe gesture (change the current image). | 1269 * horizontally it's considered as a swipe gesture (change the current image). |
1270 */ | 1270 */ |
1271 SwipeOverlay.SWIPE_THRESHOLD = 100; | 1271 SwipeOverlay.SWIPE_THRESHOLD = 100; |
OLD | NEW |