Skip to content

Commit

Permalink
'#2351 Creates function to scroll object into view, opening all its
Browse files Browse the repository at this point in the history
parent and highlighting it for 1 second.
  • Loading branch information
patrickdalla committed Oct 28, 2024
1 parent 86a10ea commit b315d4c
Showing 1 changed file with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
function clickUUID() {
const source = event.target || event.srcElement;
window.app.open('bplist\\:embeddedID:"'+source.getAttribute("uuid")+'"');
function clickUID(uid) {
var obj = document.querySelector("details[treeuid='"+uid+"']");
var a = obj;
while (a) {
a.open = 'true';
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);
}

}

window.containsNavigableTree=true;
Expand Down

0 comments on commit b315d4c

Please sign in to comment.