frontend CHANGE scroll dialog to create new nodes into a middle of the page
diff --git a/frontend/config/tree.component.ts b/frontend/config/tree.component.ts
index 6bf7b29..3c2dc9c 100644
--- a/frontend/config/tree.component.ts
+++ b/frontend/config/tree.component.ts
@@ -13,7 +13,8 @@
constructor(private elRef:ElementRef) {}
ngAfterContentInit() {
if (!('new' in this.node)) {
- this.elRef.nativeElement.scrollIntoView(false);
+ let middle = this.elRef.nativeElement.getBoundingClientRect().top + window.pageYOffset - (window.innerHeight / 2);
+ window.scrollTo(0, middle);
}
}
}