Skip to content

Commit

Permalink
'#2351 Closes all parents of clicked object reference link to force back
Browse files Browse the repository at this point in the history
repaints after object reopen and scroll.
  • Loading branch information
patrickdalla committed Oct 29, 2024
1 parent 8d158dd commit f7cc003
Showing 1 changed file with 30 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
function clickUID(uid) {
var obj = document.querySelector("details[treeuid='"+uid+"']");
var a = obj;
var b=obj;

while (a) {
a.open = 'true';
if(a instanceof HTMLElement){
a.removeAttribute('open');
}
b = a;
a = a.parentNode;
}
obj.scrollIntoView();

if(!obj.highlight){
obj.highlight=true;
bcolor = obj.style.backgroundColor;
obj.style.backgroundColor="#AAAAAA";
setTimeout(function(){
obj.style.backgroundColor=bcolor;
obj.highlight=false;},1000);
}


setTimeout(function(){
a = obj;
while (a) {
if(a instanceof HTMLElement){
a.open = 'true';
}
b = a;
a = a.parentNode;
}

obj.scrollIntoView();

if(!obj.highlight){
obj.highlight=true;
bcolor = obj.style.backgroundColor;
obj.style.backgroundColor="#AAAAAA";
setTimeout(function(){
obj.style.backgroundColor=bcolor;
obj.highlight=false;},1000);
}

},1);

}

window.containsNavigableTree=true;
Expand Down

0 comments on commit f7cc003

Please sign in to comment.