| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 */ | 1146 */ |
| 1147 _isGroupCollapsible(index) { | 1147 _isGroupCollapsible(index) { |
| 1148 var groups = this._rawTimelineData.groups || []; | 1148 var groups = this._rawTimelineData.groups || []; |
| 1149 var style = groups[index].style; | 1149 var style = groups[index].style; |
| 1150 if (!style.shareHeaderLine || !style.collapsible) | 1150 if (!style.shareHeaderLine || !style.collapsible) |
| 1151 return !!style.collapsible; | 1151 return !!style.collapsible; |
| 1152 var isLastGroup = index + 1 >= groups.length; | 1152 var isLastGroup = index + 1 >= groups.length; |
| 1153 if (!isLastGroup && groups[index + 1].style.nestingLevel > style.nestingLeve
l) | 1153 if (!isLastGroup && groups[index + 1].style.nestingLevel > style.nestingLeve
l) |
| 1154 return true; | 1154 return true; |
| 1155 var nextGroupLevel = isLastGroup ? this._dataProvider.maxStackDepth() : grou
ps[index + 1].startLevel; | 1155 var nextGroupLevel = isLastGroup ? this._dataProvider.maxStackDepth() : grou
ps[index + 1].startLevel; |
| 1156 // For groups that only have one line and share header line, pretend these a
re not collapsible. | 1156 if (nextGroupLevel !== groups[index].startLevel + 1) |
| 1157 return nextGroupLevel !== groups[index].startLevel + 1; | 1157 return true; |
| 1158 // For groups that only have one line and share header line, pretend these a
re not collapsible |
| 1159 // unless the itemsHeight does not match the headerHeight |
| 1160 return style.height !== style.itemsHeight; |
| 1158 } | 1161 } |
| 1159 | 1162 |
| 1160 /** | 1163 /** |
| 1161 * @param {number} entryIndex | 1164 * @param {number} entryIndex |
| 1162 */ | 1165 */ |
| 1163 setSelectedEntry(entryIndex) { | 1166 setSelectedEntry(entryIndex) { |
| 1164 if (entryIndex === -1 && !this.isDragging()) | 1167 if (entryIndex === -1 && !this.isDragging()) |
| 1165 this.hideRangeSelection(); | 1168 this.hideRangeSelection(); |
| 1166 if (this._selectedEntryIndex === entryIndex) | 1169 if (this._selectedEntryIndex === entryIndex) |
| 1167 return; | 1170 return; |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1623 } | 1626 } |
| 1624 | 1627 |
| 1625 /** | 1628 /** |
| 1626 * @override | 1629 * @override |
| 1627 * @return {number} | 1630 * @return {number} |
| 1628 */ | 1631 */ |
| 1629 boundarySpan() { | 1632 boundarySpan() { |
| 1630 return this._maximumBoundaries - this._minimumBoundaries; | 1633 return this._maximumBoundaries - this._minimumBoundaries; |
| 1631 } | 1634 } |
| 1632 }; | 1635 }; |
| OLD | NEW |