-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbranchy.component.html
22 lines (19 loc) · 976 Bytes
/
branchy.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<ul class="tree" *ngIf="tree">
<li>
<div (contextmenu)="showMenu($event)" [nodeDraggable]="element" [tree]="tree">
<div class="folding" (click)="switchFoldingType($event, tree)" [ngClass]="getFoldingTypeCssClass(tree)"></div>
<div href="#" class="node-value" *ngIf="!isEditInProgress()" [class.node-selected]="isSelected" (click)="onNodeSelected($event)">{{tree.value}}</div>
<input type="text" class="node-value" *ngIf="isEditInProgress()"
[nodeEditable]="tree.value"
(valueChanged)="applyNewValue($event, tree)"/>
</div>
<node-menu *ngIf="isMenuVisible" (menuItemSelected)="onMenuItemSelected($event)"></node-menu>
<template [ngIf]="isNodeExpanded()">
<tree *ngFor="let child of tree.children; let position = index"
[parentTree]="tree"
[indexInParent]="position"
[tree]="child"
(nodeRemoved)="onChildRemoved($event)"></tree>
</template>
</li>
</ul>