We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

See data on scroll shedule to right

Hello,

is there a possibility to always see data on my schedule? Now when it is scrolled to left - I can see everything, but when it is scrolled to right - i can see only schedule markers but without text:

I want to see in all cases text on my schedule:


1 Reply

NR Nevitha Ravi Syncfusion Team May 21, 2019 07:23 AM UTC

Dear Customer, 

Greetings from Syncfusion Support. 

We have prepared a sample to update the appointment text on scroll which can be viewed from the following link. 

  ngOnInit() { 
    window.addEventListener('scroll', this.scroll, true); 
  } 
 
  ngOnDestroy() { 
    window.removeEventListener('scroll', this.scroll, true); 
  } 
  scroll = (): void => { 
    if (document.querySelector('.e-appointment')) { 
      let left = document.querySelector('.e-content-wrap').scrollLeft; 
      let length = document.querySelectorAll('.e-appointment').length; 
      for (let i = 0; i < length; i++) { 
        let appWidth = (document.querySelectorAll('.e-appointment')[i] as any).offsetWidth 
        let appLeft = (document.querySelectorAll('.e-appointment')[i] as any).offsetLeft; 
        if (appLeft < left && appLeft + appWidth > left) { 
          let wrapLeft = left - appLeft; 
          (document.querySelectorAll('.e-inner-wrap')[i] as any).style.left = wrapLeft.toString() + "px"; 
          (document.querySelectorAll('.e-inner-wrap')[i] as any).style.position = "relative"; 
        } else { 
          (document.querySelectorAll('.e-inner-wrap')[i] as any).style.left = "0px"; 
        } 
      } 
    } 
  }; 

Please try the sample and let us know if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Live Chat Icon For mobile
Up arrow icon