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

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

Issue 801533006: Add type annotations to gallery/js/gallery.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed false-positive lint errors. Created 6 years 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
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/slide_mode.js » ('j') | 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 /** 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 {VolumeManagerWrapper} volumeManager Volume manager. 10 * @param {!VolumeManager} volumeManager Volume manager.
11 * @param {function()} toggleMode Function to switch to the Slide mode. 11 * @param {function()} toggleMode Function to switch to the Slide mode.
12 * @constructor 12 * @constructor
13 */ 13 */
14 function MosaicMode( 14 function MosaicMode(
15 container, errorBanner, dataModel, selectionModel, volumeManager, 15 container, errorBanner, dataModel, selectionModel, volumeManager,
16 toggleMode) { 16 toggleMode) {
17 this.mosaic_ = new Mosaic(container.ownerDocument, errorBanner, 17 this.mosaic_ = new Mosaic(container.ownerDocument, errorBanner,
18 dataModel, selectionModel, volumeManager); 18 dataModel, selectionModel, volumeManager);
19 container.appendChild(this.mosaic_); 19 container.appendChild(this.mosaic_);
20 20
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after
2002 return new ImageRect(this.left_ - this.container_.scrollLeft, this.top_, 2002 return new ImageRect(this.left_ - this.container_.scrollLeft, this.top_,
2003 this.width_, this.height_).inflate(-margin, -margin); 2003 this.width_, this.height_).inflate(-margin, -margin);
2004 }; 2004 };
2005 2005
2006 /** 2006 /**
2007 * @return {number} X coordinate of the tile center. 2007 * @return {number} X coordinate of the tile center.
2008 */ 2008 */
2009 Mosaic.Tile.prototype.getCenterX = function() { 2009 Mosaic.Tile.prototype.getCenterX = function() {
2010 return this.left_ + Math.round(this.width_ / 2); 2010 return this.left_ + Math.round(this.width_ / 2);
2011 }; 2011 };
OLDNEW
« no previous file with comments | « ui/file_manager/gallery/js/gallery.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