- This topic has 4 replies, 3 voices, and was last updated 11 years, 10 months ago by support-michael.
-
AuthorPosts
-
RTTMemberHi,
I’m trying to add a scrollstop event listener for a scrollable panel element, but the event is not trapped.
The code for the listener: $(‘m1-Equiv-eISOFrame’).on(‘scrollstop’,eFisoScroll);
This code is placed within the predefined document ready handler at the top of the custom.js file for my project.I have also tried this code in the predefined post transition function. The code does get executed, but the scrollstop event is not trapped and my handler function never executes. I used the debugger (with breakpoints) to confirm that the listener code is executing and that my handler function is never called.
What am I doing wrong?
P.s. I also have a bug to report. For the rounded panel element: I’ve set the scroll area to be 750 pixels, but when I restart MobiOne, it resets the scroll area to 748 pixels. I have no idea why 748 is chosen. The items in the panel container total 736 pixels, but I needed it to be 750 for alignment purposes.
A second panel in my project also exhibits the exact same same behavior. I have it set for 1326 pixels, but it gets changed to 1324. The items it that panel total 1312 pixels, and the value of 1326 was also for alignment purposes.Any idea why my settings of 750 and 1326 are being over-ridden?
UPDATE: Forget about the bug report. I failed to take into account the border of 1px on the panel which accounts for the 2px reduction i noticed. I just simply set the scroll area 2px greater than what I needed, and upon program restart, everything was perfect.
support-michaelKeymaster>but the scrollstop event is not trapped and my handler function never executes.
Will investigate… The panel scroller is an implementation of the open source iscroll. Are you seeking to do something such as pull/push refresh when scroll hits end of scroll range or something like that – just curious?
I am discussing w/ dev team on scroll events. Will follow up once I know more.
support-octavioMemberHi RTT,
We have received feedback from dev team: on(‘scrollstop’) doesn’t supposed to work – scrollstop is an event that fired by regular scroller (which mostly not working under mobile OSes).
Vadim (lead dev) has provided a example that should be the solution for this issue. Let us know how it goes for you.
Attachments:
You must be logged in to view attached files.
RTTMemberOctavio,
Thanks for the reply. Since I posted the question, I did some probing and did discover that the panel scrolling was implemented through iScroll. I downloaded the alternative solution you provided and will give it a look see.
Since you asked…
The panel elements in my project contain a number of evenly sized/spaced text elements. Two side by side panels needed to be synced to one another, so I needed to know the scrollbar positions for each panel to properly align the values from panel to panel. The scrollbar positions could be different from panel to panel to provide the proper value alignments I was looking for, so it was critical to be able to read and control the precise placement of the scrollbars.
Again, thanks for the support.
support-michaelKeymaster> Two side by side panels needed to be synced to one another
sounds cool!
-
AuthorPosts