onSwipeY monthly calendar in scheduler

Hello

Have added the following code to scheduler so that pulling from the top of the screen will refresh the data in scheduler. It works in all views pretty well. Except in month view when a day is selected with many events, it doesn’t work. Instead, the whole calendar moves down then jumps back up when swipe is done.

	webix.attachEvent("onSwipeY",function(c1,c2){
	   if( c2.y - c1.y > 0 ){
		   SSreload();
	   }
	});							

I’ve also tried adding to specific components, but that didn’t seem to help:

	$$("scheduler").$$("calendar").attachEvent("onSwipeY",SSreload);

I would be nice to also have some animation effect too, if you have something like this. But if not, I can create something in the reload function.

Thanks

Hello,

Touch-related events cannot be attached to specific components, as they are global and can be attached only to webix object.

For components like Calendar that do not feature inner scroll, you can find out whether the swipe movement occured within them with the help of the target HTML element and the topmost HTML element of the desired view.

webix.attachEvent("onSwipeY",function(c1,c2){
    //c1.target - HTML element that originated the event
    //$$("scheduler").$$("calendar").$view - top HTML element of the Calendar
});

The scrollable components like List fire the standard onAfterScroll event in both desktop and touch environment.