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 * @unrestricted | 5 * @unrestricted |
6 * @extends {DataGrid.DataGrid<!NODE_TYPE>} | 6 * @extends {DataGrid.DataGrid<!NODE_TYPE>} |
7 * @template NODE_TYPE | 7 * @template NODE_TYPE |
8 */ | 8 */ |
9 DataGrid.ViewportDataGrid = class extends DataGrid.DataGrid { | 9 DataGrid.ViewportDataGrid = class extends DataGrid.DataGrid { |
10 /** | 10 /** |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 return; | 455 return; |
456 this.clearFlatNodes(); | 456 this.clearFlatNodes(); |
457 super.expand(); | 457 super.expand(); |
458 this.dataGrid.scheduleUpdateStructure(); | 458 this.dataGrid.scheduleUpdateStructure(); |
459 } | 459 } |
460 | 460 |
461 /** | 461 /** |
462 * @protected | 462 * @protected |
463 */ | 463 */ |
464 willAttach() { | 464 willAttach() { |
| 465 var leftPadding = this.leftPadding; |
| 466 var disclosureCell = this.disclosureCell(); |
| 467 if (leftPadding && disclosureCell) |
| 468 disclosureCell.style.setProperty('padding-left', leftPadding + 'px'); |
465 } | 469 } |
466 | 470 |
467 /** | 471 /** |
468 * @protected | 472 * @protected |
469 * @return {boolean} | 473 * @return {boolean} |
470 */ | 474 */ |
471 attached() { | 475 attached() { |
472 return !!(this.dataGrid && this.existingElement() && this.existingElement().
parentElement); | 476 return !!(this.dataGrid && this.existingElement() && this.existingElement().
parentElement); |
473 } | 477 } |
474 | 478 |
(...skipping 29 matching lines...) Expand all Loading... |
504 | 508 |
505 /** | 509 /** |
506 * @override | 510 * @override |
507 * @param {number} index | 511 * @param {number} index |
508 */ | 512 */ |
509 recalculateSiblings(index) { | 513 recalculateSiblings(index) { |
510 this.clearFlatNodes(); | 514 this.clearFlatNodes(); |
511 super.recalculateSiblings(index); | 515 super.recalculateSiblings(index); |
512 } | 516 } |
513 }; | 517 }; |
OLD | NEW |