OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 cr.define('ntp4', function() { | 5 cr.define('ntp4', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 // We can't pass the currently dragging tile via dataTransfer because of | 8 // We can't pass the currently dragging tile via dataTransfer because of |
9 // http://crbug.com/31037 | 9 // http://crbug.com/31037 |
10 var currentlyDraggingTile = null; | 10 var currentlyDraggingTile = null; |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 this.appendChild(this.content_); | 383 this.appendChild(this.content_); |
384 | 384 |
385 // Div that sets the vertical position of the tile grid. | 385 // Div that sets the vertical position of the tile grid. |
386 this.topMargin_ = this.ownerDocument.createElement('div'); | 386 this.topMargin_ = this.ownerDocument.createElement('div'); |
387 this.topMargin_.className = 'top-margin'; | 387 this.topMargin_.className = 'top-margin'; |
388 this.content_.appendChild(this.topMargin_); | 388 this.content_.appendChild(this.topMargin_); |
389 | 389 |
390 // Div that holds the tiles. | 390 // Div that holds the tiles. |
391 this.tileGrid_ = this.ownerDocument.createElement('div'); | 391 this.tileGrid_ = this.ownerDocument.createElement('div'); |
392 this.tileGrid_.className = 'tile-grid'; | 392 this.tileGrid_.className = 'tile-grid'; |
393 this.tileGrid_.style.minWidth = (this.gridValues_.minColCount * | |
csilv
2011/08/09 19:11:20
is this change intended for this CL? just sanity
| |
394 this.gridValues_.minTileWidth) + 'px'; | |
393 this.content_.appendChild(this.tileGrid_); | 395 this.content_.appendChild(this.tileGrid_); |
394 | 396 |
395 // Ordered list of our tiles. | 397 // Ordered list of our tiles. |
396 this.tileElements_ = this.tileGrid_.getElementsByClassName('tile real'); | 398 this.tileElements_ = this.tileGrid_.getElementsByClassName('tile real'); |
397 | 399 |
398 // These are properties used in updateTopMargin. | 400 // These are properties used in updateTopMargin. |
399 this.animatedTopMarginPx_ = 0; | 401 this.animatedTopMarginPx_ = 0; |
400 this.topMarginPx_ = 0; | 402 this.topMarginPx_ = 0; |
401 | 403 |
402 this.eventTracker = new EventTracker(); | 404 this.eventTracker = new EventTracker(); |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
993 */ | 995 */ |
994 tileMoved: function(draggedTile) { | 996 tileMoved: function(draggedTile) { |
995 }, | 997 }, |
996 }; | 998 }; |
997 | 999 |
998 return { | 1000 return { |
999 getCurrentlyDraggingTile: getCurrentlyDraggingTile, | 1001 getCurrentlyDraggingTile: getCurrentlyDraggingTile, |
1000 TilePage: TilePage, | 1002 TilePage: TilePage, |
1001 }; | 1003 }; |
1002 }); | 1004 }); |
OLD | NEW |