smooth out jump and clean up CSS a little bit
This commit is contained in:
@@ -141,11 +141,18 @@ class InfiniteScroller{
|
||||
}
|
||||
console.log(element,id,":3");
|
||||
if(element){
|
||||
element.scrollIntoView();
|
||||
|
||||
if(flash){
|
||||
element.scrollIntoView({
|
||||
behavior:"smooth",
|
||||
block:"center"
|
||||
});
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
element.classList.remove("jumped");
|
||||
await new Promise(resolve => setTimeout(resolve, 100));
|
||||
element.classList.add("jumped");
|
||||
}else{
|
||||
element.scrollIntoView();
|
||||
}
|
||||
}else{
|
||||
for(const thing of this.HTMLElements){
|
||||
|
Reference in New Issue
Block a user