OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 this._smallChildren = x; | 55 this._smallChildren = x; |
56 | 56 |
57 this._childrenListNode.classList.toggle("small", this._smallChildren); | 57 this._childrenListNode.classList.toggle("small", this._smallChildren); |
58 }, | 58 }, |
59 | 59 |
60 onattach: function() | 60 onattach: function() |
61 { | 61 { |
62 this.listItemElement.classList.add("sidebar-tree-section"); | 62 this.listItemElement.classList.add("sidebar-tree-section"); |
63 }, | 63 }, |
64 | 64 |
65 onreveal: function() | |
66 { | |
67 if (this.listItemElement) | |
68 this.listItemElement.scrollIntoViewIfNeeded(false); | |
69 }, | |
70 | |
71 __proto__: TreeElement.prototype | 65 __proto__: TreeElement.prototype |
72 } | 66 } |
73 | 67 |
74 /** | 68 /** |
75 * @constructor | 69 * @constructor |
76 * @extends {TreeElement} | 70 * @extends {TreeElement} |
77 * @param {string} className | 71 * @param {string} className |
78 * @param {string} title | 72 * @param {string} title |
79 * @param {string=} subtitle | 73 * @param {string=} subtitle |
80 * @param {boolean=} expandable | 74 * @param {boolean=} expandable |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 169 |
176 if (this.small) | 170 if (this.small) |
177 this.listItemElement.classList.add("small"); | 171 this.listItemElement.classList.add("small"); |
178 | 172 |
179 if (this.isExpandable() && this.disclosureButton) | 173 if (this.isExpandable() && this.disclosureButton) |
180 this.listItemElement.appendChild(this.disclosureButton); | 174 this.listItemElement.appendChild(this.disclosureButton); |
181 | 175 |
182 this.listItemElement.appendChildren(this.iconElement, this.statusElement
, this.titlesElement); | 176 this.listItemElement.appendChildren(this.iconElement, this.statusElement
, this.titlesElement); |
183 }, | 177 }, |
184 | 178 |
185 onreveal: function() | |
186 { | |
187 if (this.listItemElement) | |
188 this.listItemElement.scrollIntoViewIfNeeded(false); | |
189 }, | |
190 | |
191 __proto__: TreeElement.prototype | 179 __proto__: TreeElement.prototype |
192 } | 180 } |
OLD | NEW |