improve gabinete digital responsiveness

This commit is contained in:
Peter Maquiran
2021-05-05 13:44:51 +01:00
parent 31dc57d0f8
commit 6da979ccc5
4 changed files with 30 additions and 20 deletions
+25 -15
View File
@@ -339,22 +339,32 @@ export class AgendaPage implements OnInit {
// for timeline
centralizeTimeline(timeout: number) {
// auto scroll timeline
setTimeout(() => {
const timelineMarker = document.querySelector('.cal-current-time-marker');
const scrollContainer = document.querySelector('.timeline-wrapper');
try {
scrollContainer.scroll({
top: timelineMarker['offsetTop'] - ((scrollContainer['offsetHeight']/2) - 60),
left: 0,
behavior: 'smooth'
})
} catch (error) {
//
this.selectFirstEventOfTheDay();
}
}, timeout);
if(!this.showLoader) {
setTimeout(() => {
const timelineMarker = document.querySelector('.cal-current-time-marker');
const scrollContainer = document.querySelector('.timeline-wrapper');
try {
scrollContainer.scroll({
top: timelineMarker['offsetTop'] - ((scrollContainer['offsetHeight']/2) - 60),
left: 0,
behavior: 'smooth'
})
} catch (error) {
//
if(!this.showLoader) {
this.selectFirstEventOfTheDay();
}
}
}, timeout);
}
}
// for timeline