OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // require: listselectionmodel.js | 5 // require: listselectionmodel.js |
6 | 6 |
7 /** | 7 /** |
8 * @fileoverview This implements a list control. | 8 * @fileoverview This implements a list control. |
9 */ | 9 */ |
10 | 10 |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 if (listItem) { | 576 if (listItem) { |
577 var list = this; | 577 var list = this; |
578 window.setTimeout(function() { | 578 window.setTimeout(function() { |
579 if (listItem.parentNode == list) | 579 if (listItem.parentNode == list) |
580 list.itemHeight_ = measureItem(list, listItem); | 580 list.itemHeight_ = measureItem(list, listItem); |
581 }); | 581 }); |
582 } | 582 } |
583 }, | 583 }, |
584 | 584 |
585 /** | 585 /** |
586 * Redraws a single item | 586 * Redraws a single item. |
587 * @param {number} index The row index to redraw. | 587 * @param {number} index The row index to redraw. |
588 */ | 588 */ |
589 redrawItem: function(index) { | 589 redrawItem: function(index) { |
590 if (index >= this.firstIndex_ && index < this.lastIndex_) { | 590 if (index >= this.firstIndex_ && index < this.lastIndex_) { |
591 delete this.cachedItems_[index]; | 591 delete this.cachedItems_[index]; |
592 this.redraw(); | 592 this.redraw(); |
593 } | 593 } |
594 } | 594 }, |
595 }; | 595 }; |
596 | 596 |
597 cr.defineProperty(List, 'disabled', cr.PropertyKind.BOOL_ATTR); | 597 cr.defineProperty(List, 'disabled', cr.PropertyKind.BOOL_ATTR); |
598 | 598 |
599 return { | 599 return { |
600 List: List | 600 List: List |
601 } | 601 } |
602 }); | 602 }); |
OLD | NEW |