| OLD | NEW |
| 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 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 | 468 |
| 469 get tileCount() { | 469 get tileCount() { |
| 470 return this.tileElements_.length; | 470 return this.tileElements_.length; |
| 471 }, | 471 }, |
| 472 | 472 |
| 473 get selected() { | 473 get selected() { |
| 474 return Array.prototype.indexOf.call(this.parentNode.children, this) == | 474 return Array.prototype.indexOf.call(this.parentNode.children, this) == |
| 475 ntp4.getCardSlider().currentCard; | 475 ntp4.getCardSlider().currentCard; |
| 476 }, | 476 }, |
| 477 | 477 |
| 478 get gridValues() { |
| 479 return this.gridValues_; |
| 480 }, |
| 481 |
| 482 get layoutValues() { |
| 483 return this.layoutValues_; |
| 484 }, |
| 485 |
| 478 /** | 486 /** |
| 479 * The size of the margin (unused space) on the sides of the tile grid, in | 487 * The size of the margin (unused space) on the sides of the tile grid, in |
| 480 * pixels. | 488 * pixels. |
| 481 * @type {number} | 489 * @type {number} |
| 482 */ | 490 */ |
| 483 get sideMargin() { | 491 get sideMargin() { |
| 484 return this.layoutValues_.leftMargin; | 492 return this.layoutValues_.leftMargin; |
| 485 }, | 493 }, |
| 486 | 494 |
| 487 /** | 495 /** |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 assert(false); | 1297 assert(false); |
| 1290 }, | 1298 }, |
| 1291 }; | 1299 }; |
| 1292 | 1300 |
| 1293 return { | 1301 return { |
| 1294 getCurrentlyDraggingTile: getCurrentlyDraggingTile, | 1302 getCurrentlyDraggingTile: getCurrentlyDraggingTile, |
| 1295 setCurrentDropEffect: setCurrentDropEffect, | 1303 setCurrentDropEffect: setCurrentDropEffect, |
| 1296 TilePage: TilePage, | 1304 TilePage: TilePage, |
| 1297 }; | 1305 }; |
| 1298 }); | 1306 }); |
| OLD | NEW |