twinssbc / Ionic2-Calendar

A calendar component based on Ionic framework
https://ionic-calendar-demo.stackblitz.io
MIT License
388 stars 197 forks source link

Scroll position in day and weekview not saved after swiping #22

Closed Daskus1 closed 7 years ago

Daskus1 commented 7 years ago

When swiping in dayview or weekview the scroll-point is not saved. This means if I scroll to the bottom and then swipe the scroll position will be again at the top (12am).

twinssbc commented 7 years ago

I will try to expose an option for this feature.

twinssbc commented 7 years ago

@Daskus1 I have added two scrolling related options, scrollToHour and preserveScrollPosition. Feel free to have a try.

Daskus1 commented 7 years ago

Works fine! Good work. the only thing I had to do in order to make it work, since I got a typescript error, was changing super(el) to super() in the constructor of src\init-position-scroll.ts

twinssbc commented 7 years ago

@Daskus1 The scroll component in Ionic3 was updated last month to remove the parameter of the constructor. Since I still need to make my code compatible with old versions, so I can't remove that parameter. I may remove it in the future version.