Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ui/file_manager/gallery/js/ribbon.js

Issue 287063006: Gallery: Fix property names referred in the Ribbon class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/photo/ribbon.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Scrollable thumbnail ribbon at the bottom of the Gallery in the Slide mode. 8 * Scrollable thumbnail ribbon at the bottom of the Gallery in the Slide mode.
9 * 9 *
10 * @param {Document} document Document. 10 * @param {Document} document Document.
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 }; 337 };
338 338
339 /** 339 /**
340 * Content change handler. 340 * Content change handler.
341 * 341 *
342 * @param {Event} event Event. 342 * @param {Event} event Event.
343 * @private 343 * @private
344 */ 344 */
345 Ribbon.prototype.onContentChange_ = function(event) { 345 Ribbon.prototype.onContentChange_ = function(event) {
346 var url = event.item.getEntry().toURL(); 346 var url = event.item.getEntry().toURL();
347 this.remapCache_(event.oldUrl, url); 347 this.remapCache_(event.oldEntry.toURL(), url);
348 348
349 var thumbnail = this.renderCache_[url]; 349 var thumbnail = this.renderCache_[url];
350 if (thumbnail && event.metadata) 350 if (thumbnail && event.metadata)
351 this.setThumbnailImage_(thumbnail, event.item.getEntry(), event.metadata); 351 this.setThumbnailImage_(thumbnail, event.item.getEntry(), event.metadata);
352 }; 352 };
353 353
354 /** 354 /**
355 * Update the thumbnail element cache. 355 * Update the thumbnail element cache.
356 * 356 *
357 * @param {string} oldUrl Old url. 357 * @param {string} oldUrl Old url.
358 * @param {string} newUrl New url. 358 * @param {string} newUrl New url.
359 * @private 359 * @private
360 */ 360 */
361 Ribbon.prototype.remapCache_ = function(oldUrl, newUrl) { 361 Ribbon.prototype.remapCache_ = function(oldUrl, newUrl) {
362 if (oldUrl != newUrl && (oldUrl in this.renderCache_)) { 362 if (oldUrl != newUrl && (oldUrl in this.renderCache_)) {
363 this.renderCache_[newUrl] = this.renderCache_[oldUrl]; 363 this.renderCache_[newUrl] = this.renderCache_[oldUrl];
364 delete this.renderCache_[oldUrl]; 364 delete this.renderCache_[oldUrl];
365 } 365 }
366 }; 366 };
OLDNEW
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/photo/ribbon.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698