Skip to content

Commit 687e75c

Browse files
hawkgspkozlowski-opensource
authored andcommitted
refactor(devtools): update directive forest chevrons positioning method
Update how chevrons of each expandable directive forest item are positioned by being more explicit.
1 parent 60930f8 commit 687e75c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/tree-node/tree-node.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
@if (node().expandable) {
55
<!-- We stop propagration on dblClick to prevent to show the element panel -->
66
<button
7-
[style.left]="PADDING_LEFT_STEP * node().level + 'px'"
87
(click)="treeControl().toggle(node())"
98
(dblclick)="$event.stopPropagation()"
109
[attr.aria-label]="'Toggle ' + node().name"

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/tree-node/tree-node.component.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
}
3939

4040
.tree-node-info {
41+
position: relative;
4142
display: flex;
4243
align-items: center;
4344

@@ -50,7 +51,9 @@
5051
padding: 0;
5152
position: absolute;
5253
background-color: transparent;
53-
margin-left: 3px;
54+
margin-left: -$size;
55+
top: calc(50% - $size / 2);
56+
left: 0;
5457

5558
mat-icon {
5659
font-size: $size;

devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/tree-node/tree-node.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export class TreeNodeComponent {
8181

8282
private matchedText: HTMLElement | null = null;
8383

84-
protected readonly PADDING_LEFT_STEP = PADDING_LEFT_STEP;
85-
8684
constructor() {
8785
afterRenderEffect({write: () => this.handleMatchedText()});
8886
}

0 commit comments

Comments
 (0)