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'; | |
6 | |
7 /** | 5 /** |
8 * @param {Element} container Content container. | 6 * @param {Element} container Content container. |
9 * @param {ErrorBanner} errorBanner Error banner. | 7 * @param {ErrorBanner} errorBanner Error banner. |
10 * @param {cr.ui.ArrayDataModel} dataModel Data model. | 8 * @param {cr.ui.ArrayDataModel} dataModel Data model. |
11 * @param {cr.ui.ListSelectionModel} selectionModel Selection model. | 9 * @param {cr.ui.ListSelectionModel} selectionModel Selection model. |
12 * @param {VolumeManagerWrapper} volumeManager Volume manager. | 10 * @param {VolumeManagerWrapper} volumeManager Volume manager. |
13 * @param {function()} toggleMode Function to switch to the Slide mode. | 11 * @param {function()} toggleMode Function to switch to the Slide mode. |
14 * @constructor | 12 * @constructor |
15 */ | 13 */ |
16 function MosaicMode( | 14 function MosaicMode( |
(...skipping 1987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2004 return new ImageRect(this.left_ - this.container_.scrollLeft, this.top_, | 2002 return new ImageRect(this.left_ - this.container_.scrollLeft, this.top_, |
2005 this.width_, this.height_).inflate(-margin, -margin); | 2003 this.width_, this.height_).inflate(-margin, -margin); |
2006 }; | 2004 }; |
2007 | 2005 |
2008 /** | 2006 /** |
2009 * @return {number} X coordinate of the tile center. | 2007 * @return {number} X coordinate of the tile center. |
2010 */ | 2008 */ |
2011 Mosaic.Tile.prototype.getCenterX = function() { | 2009 Mosaic.Tile.prototype.getCenterX = function() { |
2012 return this.left_ + Math.round(this.width_ / 2); | 2010 return this.left_ + Math.round(this.width_ / 2); |
2013 }; | 2011 }; |
OLD | NEW |