mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
improve gabinete digital responsiveness
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user