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

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

Issue 1010163002: Files.app: Fix closure error which will raised by the updated compiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Define FakeEntry record type and use it. Created 5 years, 9 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
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 /** 5 /**
6 * @param {!Element} container Content container. 6 * @param {!Element} container Content container.
7 * @param {!ErrorBanner} errorBanner Error banner. 7 * @param {!ErrorBanner} errorBanner Error banner.
8 * @param {!cr.ui.ArrayDataModel} dataModel Data model. 8 * @param {!cr.ui.ArrayDataModel} dataModel Data model.
9 * @param {!cr.ui.ListSelectionModel} selectionModel Selection model. 9 * @param {!cr.ui.ListSelectionModel} selectionModel Selection model.
10 * @param {!VolumeManager} volumeManager Volume manager. 10 * @param {!VolumeManager} volumeManager Volume manager.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 Math.max(0, Mosaic.ANIMATED_SCROLL_DURATION - lastPosition)); 310 Math.max(0, Mosaic.ANIMATED_SCROLL_DURATION - lastPosition));
311 scrollOffset += step; 311 scrollOffset += step;
312 312
313 var oldScrollLeft = this.scrollLeft; 313 var oldScrollLeft = this.scrollLeft;
314 var newScrollLeft = Math.round(scrollOffset); 314 var newScrollLeft = Math.round(scrollOffset);
315 315
316 if (oldScrollLeft !== newScrollLeft) 316 if (oldScrollLeft !== newScrollLeft)
317 this.scrollLeft = newScrollLeft; 317 this.scrollLeft = newScrollLeft;
318 318
319 if (step === 0 || this.scrollLeft !== newScrollLeft) { 319 if (step === 0 || this.scrollLeft !== newScrollLeft) {
320 this.scrollAnimation_ = null; 320 this.scrollAnimation_ = 0;
321 // Release the hovering lock after a safe delay to avoid hovering 321 // Release the hovering lock after a safe delay to avoid hovering
322 // a tile because of altering |this.scrollLeft|. 322 // a tile because of altering |this.scrollLeft|.
323 setTimeout(function() { 323 setTimeout(function() {
324 if (!this.scrollAnimation_) 324 if (!this.scrollAnimation_)
325 this.suppressHovering_ = false; 325 this.suppressHovering_ = false;
326 }.bind(this), 100); 326 }.bind(this), 100);
327 } else { 327 } else {
328 // Continue the animation. 328 // Continue the animation.
329 this.scrollAnimation_ = requestAnimationFrame(animationFrame); 329 this.scrollAnimation_ = requestAnimationFrame(animationFrame);
330 } 330 }
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 return new ImageRect(this.left_ - this.container_.scrollLeft, this.top_, 2309 return new ImageRect(this.left_ - this.container_.scrollLeft, this.top_,
2310 this.width_, this.height_).inflate(-margin, -margin); 2310 this.width_, this.height_).inflate(-margin, -margin);
2311 }; 2311 };
2312 2312
2313 /** 2313 /**
2314 * @return {number} X coordinate of the tile center. 2314 * @return {number} X coordinate of the tile center.
2315 */ 2315 */
2316 Mosaic.Tile.prototype.getCenterX = function() { 2316 Mosaic.Tile.prototype.getCenterX = function() {
2317 return this.left_ + Math.round(this.width_ / 2); 2317 return this.left_ + Math.round(this.width_ / 2);
2318 }; 2318 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698