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

Side by Side Diff: chrome/browser/resources/file_manager/js/photo/tile_view.js

Issue 12262006: [Cleanup] Files.app: Add '@constructor' annotates to constructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « chrome/browser/resources/file_manager/js/photo/source.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 (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 /** 5 /**
6 * Tile view displays images/videos tiles. 6 * Tile view displays images/videos tiles.
7 * @param {HTMLDocument} document Document. 7 * @param {HTMLDocument} document Document.
8 * @param {function(TailBox, callback)} prepareBox This function should provide 8 * @param {function(TailBox, callback)} prepareBox This function should provide
9 * the passed box with width and height properties of the image. 9 * the passed box with width and height properties of the image.
10 * @param {function(TailBox, callback)} loadBox This function should display 10 * @param {function(TailBox, callback)} loadBox This function should display
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 self.ready = false; 442 self.ready = false;
443 self.rect = {row: 0, col: 0, width: 0, height: 0}; 443 self.rect = {row: 0, col: 0, width: 0, height: 0};
444 444
445 self.index = null; 445 self.index = null;
446 self.height = null; 446 self.height = null;
447 self.width = null; 447 self.width = null;
448 }; 448 };
449 449
450 /** 450 /**
451 * Sets box position according to the |rect| property and given sizes. 451 * Sets box position according to the |rect| property and given sizes.
452 * @constructor
452 * @param {number} margin Margin between cells. 453 * @param {number} margin Margin between cells.
453 * @param {number} cellSize The size of one cell. 454 * @param {number} cellSize The size of one cell.
454 */ 455 */
455 TileBox.setPositionFromRect = function(margin, cellSize) { 456 TileBox.setPositionFromRect = function(margin, cellSize) {
456 this.style.top = margin + (cellSize + margin) * this.rect.row + 'px'; 457 this.style.top = margin + (cellSize + margin) * this.rect.row + 'px';
457 this.style.left = margin + (cellSize + margin) * this.rect.col + 'px'; 458 this.style.left = margin + (cellSize + margin) * this.rect.col + 'px';
458 this.style.height = (cellSize + margin) * this.rect.height - margin + 'px'; 459 this.style.height = (cellSize + margin) * this.rect.height - margin + 'px';
459 this.style.width = (cellSize + margin) * this.rect.width - margin + 'px'; 460 this.style.width = (cellSize + margin) * this.rect.width - margin + 'px';
460 }; 461 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/photo/source.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698