Scroll tree elements to view even if they don't have a parent element.
This commit is contained in:
parent
4694fe640a
commit
ff53c05bb2
@ -155,11 +155,6 @@ div.ov_toolbar div.ov_toolbar_button div.ov_svg_icon
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.ov_toolbar div.ov_toolbar_button.right
|
|
||||||
{
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.ov_toolbar div.ov_toolbar_button.selected
|
div.ov_toolbar div.ov_toolbar_button.selected
|
||||||
{
|
{
|
||||||
background: var(--ov_toolbar_selected_color);
|
background: var(--ov_toolbar_selected_color);
|
||||||
|
|||||||
@ -82,11 +82,15 @@ OV.TreeViewSingleItem = class extends OV.TreeViewItem
|
|||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
this.mainElement.addClass ('selected');
|
this.mainElement.addClass ('selected');
|
||||||
let parent = this.parent;
|
let parent = this.parent;
|
||||||
while (parent !== null) {
|
if (parent === null) {
|
||||||
parent.ShowChildren (true, () => {
|
OV.ScrollToView (this.mainElement);
|
||||||
OV.ScrollToView (this.mainElement);
|
} else {
|
||||||
});
|
while (parent !== null) {
|
||||||
parent = parent.parent;
|
parent.ShowChildren (true, () => {
|
||||||
|
OV.ScrollToView (this.mainElement);
|
||||||
|
});
|
||||||
|
parent = parent.parent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.mainElement.removeClass ('selected');
|
this.mainElement.removeClass ('selected');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user