All files / app/component/graph/force-directed force-directed.component.html

23.93% Statements 28/117
11.11% Branches 2/18
0% Functions 0/15
46.15% Lines 24/52

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 731x   1x 1x 1x             1x       1x       1x       1x     1x   1x     1x           1x             1x             1x     1x     1x 2x 1x   1x 2x     1x 1x 2x   1x      
<figure id="force-directed-graph"
        #figure
        (click)="store.graph.clearSelection()"
        (contextmenu)="contextMenu(null, $event)"></figure>
<ng-template #nodeMenu let-ref>
  <div class="context-menu" (click)="$event.stopPropagation()">
    @if (ref) {
      <div (click)="pin(ref)">
        <input id="pinned"
               type="checkbox"
               [checked]="ref.pinned">
        <label for="pinned" i18n>Pinned</label>
      </div>
      @if (countRefUnloaded(ref); as uc) {
        <hr>
        <div (click)="load(ref)" i18n>Load @if (uc > 1) {<span>{{ max(uc) }}</span>}</div>
      }
      @if (countUnloadedSource(ref); as sc) {
        <hr>
        <div (click)="loadSources(ref)" i18n>Load sources @if (sc > 1) {<span>{{ max(sc) }}</span>}</div>
      }
      @if (countUnloadedResponse(ref); as rc) {
        <hr>
        <div (click)="loadResponses(ref)" i18n>Load responses @if (rc > 1) {<span>{{ max(rc) }}</span>}</div>
      }
      <hr>
      <div (click)="remove(ref)" i18n>Remove</div>
      <hr>
      <div (click)="restart(ref)" i18n>Restart from here</div>
      <hr>
    }
    <div (click)="selectAll()" i18n>Select all</div>
    <hr>
    <div (click)="toggleUnloaded()">
      <input id="unloaded"
             type="checkbox"
             [checked]="store.graph.showUnloaded">
      <label for="unloaded" i18n>Show unloaded references</label>
    </div>
    <hr>
    <div (click)="toggleTimeline()">
      <input id="timeline"
             type="checkbox"
             [checked]="store.graph.timeline">
      <label for="timeline" i18n>Timeline force on X-axis</label>
    </div>
    <hr>
    <div (click)="toggleArrows()">
      <input id="arrows"
             type="checkbox"
             [checked]="store.graph.arrows">
      <label for="timeline" i18n>Show arrow from source to response</label>
    </div>
    <hr>
    <div (click)="fullscreen()" i18n>Fullscreen</div>
  </div>
</ng-template>
<ng-container *mobxAutorun>
  @if (store.graph.unloaded.length) {
    <a class="load-more fake-link no-select" (click)="drawMore()" i18n>load more</a>
  }
  <div class="loading-container">
    @if (store.graph.loading.length) {
      <app-loading></app-loading>
    }
  </div>
  <label class="graph-selected no-select" i18n>Selected:</label>
  <app-ref-list #list [page]="store.graph.selectedPage"
                i18n-emptyMessage
                emptyMessage="Empty selection"
                [pageControls]="false"></app-ref-list>
</ng-container>