Skip to content

Commit 6c9789f

Browse files
Googlercopybara-github
authored andcommitted
Show execution count as a group label if exists
PiperOrigin-RevId: 707809922
1 parent e9324c1 commit 6c9789f

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/app/directed_acyclic_graph_raw.ng.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,16 @@
385385
This causes the DAG to open up, fade-in the label before hiding it,
386386
which looks very glitchy
387387
-->
388-
<span *ngIf="group.treatAsLoop" class="fade-in" [attr.aria-hidden]="isGroupExpanded(group)">
389-
<span class="iteration-counter"> {{ getIterationsFor(group).length }} iterations </span>
390-
</span>
391388
@if (showGroupLabel(group)) {
392389
<div class="group-label">
393390
<span class="fade-in">
394391
<span> {{ group.groupLabel }} </span>
395392
</span>
396393
</div>
394+
} @else if (group.treatAsLoop) {
395+
<span class="fade-in" [attr.aria-hidden]="isGroupExpanded(group)">
396+
<span class="iteration-counter"> {{ getIterationsFor(group).length }} iterations </span>
397+
</span>
397398
}
398399
<button
399400
class="expand-toggle"

src/app/directed_acyclic_graph_raw.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,13 +460,15 @@ export class DagRaw implements DoCheck, OnInit, OnDestroy {
460460
}
461461

462462
showGroupLabel(group: DagGroup) {
463-
if (group.treatAsLoop || !group.groupLabel) return false;
463+
if (!group.groupLabel) return false;
464464
if (this.isGroupExpanded(group) && group.hasControlNode &&
465465
!group.hideControlNodeOnExpand) {
466-
return false
466+
return false;
467467
}
468-
return true
468+
469+
return true;
469470
}
471+
470472
broadcastIterChange(
471473
group: DagGroup, iterationNode: GroupIterationRecord['iterationNode']) {
472474
(group as any)._cachedSelection = iterationNode;

0 commit comments

Comments
 (0)