Skip to content

Commit d907abc

Browse files
David Martínez RosDavid Martínez Ros
authored andcommitted
change the styles of the tree div and the node div
1 parent c45b1db commit d907abc

File tree

2 files changed

+33
-17
lines changed

2 files changed

+33
-17
lines changed
Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
1-
div {
2-
background: #363ca1;
3-
border-radius: 4px;
4-
box-shadow: 0 1px 2px 1px rgba(0, 0, 0, 0.25);
5-
will-change: transform;
1+
div.node {
2+
width: fit-content;
63
cursor: pointer;
7-
padding: 0 0 0 0;
8-
margin: 0 0 0 0;
4+
line-height: 13px;
5+
width:100%;
96
}
107

11-
.images {
8+
img {
129
float: left;
13-
display: block;
14-
padding: 0 0 0 0;
15-
margin: 0 0 0 0;
10+
line-height: 13px;
11+
}
12+
13+
div.text {
14+
display: inline-block;
15+
line-height: 11px;
16+
font-family: arial;
17+
border: 1px solid lightgoldenrodyellow;
18+
color:black;
19+
background: darkgoldenrod;
20+
}
21+
22+
div.text:hover {
23+
border: 1px solid darkgoldenrod;
24+
color:black;
25+
background: lightgoldenrodyellow;
26+
}
27+
28+
div.text:active {
29+
border: 1px solid black;
30+
color:white;
31+
background: black;
1632
}

src/app/node-tree/node-tree.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<div id="{{ node.id }}">
2-
<span class="images">
3-
<span *ngIf="node.parents.length > 0" class="images">
4-
<span *ngFor="let p of node.parents" class="images">
1+
<div id="{{ node.id }}" class="node">
2+
<span>
3+
<span *ngIf="node.parents.length > 0">
4+
<span *ngFor="let p of node.parents">
55
<img *ngIf="!p.lastNode" src="../assets/line_continue.png"/>
66
<img *ngIf="p.lastNode" src="../assets/blank_node.png"/>
77
</span>
@@ -11,10 +11,10 @@
1111
<img *ngIf="node.lastNode" src="../assets/line_node_and_end.png"/>
1212
<img *ngIf="!node.sheet && node.expand" src="../assets/collapse_icon.png" (click)="clickExpandCollapse()"/>
1313
<img *ngIf="!node.sheet && !node.expand" src="../assets/expand_icon.png" (click)="clickExpandCollapse()"/>
14-
<img *ngIf="node.sheet" src="../assets/line_sheet.png" (click)="clickExpandCollapse()"/>
14+
<img *ngIf="node.sheet" src="../assets/line_sheet.png"/>
1515
</span>
1616

17-
<span><b>{{ node.name }}</b> el seu pare es: {{ node.idParent }}</span>
17+
<div class="text"><b>{{ node.name }}</b> el seu pare es: {{ node.idParent }}</div>
1818
</div>
1919
<div *ngIf="!node.sheet">
2020
<div *ngIf="node.expand">

0 commit comments

Comments
 (0)