PDA

View Full Version : Slowing down Carousel acceleration.



neural
19 Oct 2010, 8:04 AM
Is there any way to slow down the acceleration on the Sencha carousels? I'm using the 0.93 version of Sencha and there are times where I'll drag the pane, stop and let go and it'll just accelerate out of nowhere or where I'll drag and let go and the acceleration just doesn't match how quickly I was moving the mouse. I'd say about 60% of the time it's working pretty well, but there are a bunch of quirks.

Is there any way to go into the code and cut down the inertial scrolling speed?

jay@moduscreate.com
19 Oct 2010, 8:08 AM
Sencha is the company name. Do you use "Apple" or "Microsoft"?

That said, .97 of Sencha Touch is out, and you should use that. LOTS of fixes were implemented.

neural
19 Oct 2010, 8:10 AM
Wow, kind of a dick reply. Maybe since we're in the Sencha Touch forum, I didn't feel the need to write the entire thing out? And the last time I tried upgrading to .96 of Sencha Touch it broke everything, but I'll give .97 a try.

jay@moduscreate.com
19 Oct 2010, 8:26 AM
Wow, kind of a dick reply. Maybe since we're in the Sencha Touch forum, I didn't feel the need to write the entire thing out? And the last time I tried upgrading to .96 of Sencha Touch it broke everything, but I'll give .97 a try.

Be nice!

That said, lots of things changed from .93 to .97. You *don't* want to stay on .93, I can assure you that!

neural
19 Oct 2010, 8:32 AM
Unfortunately, like .96, .97 breaks the carousel on the page. Instead of everything being lined up properly like it does on .93, each successive panel stair steps down the page.

jay@moduscreate.com
19 Oct 2010, 8:42 AM
Interesting. Is there any way you could post a reproducible test case?

neural
19 Oct 2010, 9:00 AM
Not without releasing the app. In the meantime I've switched back to .93 as the scrolling panels work much better there for what we need and inspected the panel scroller object. I found an attribute called "omega" with a value of .97. I changed that to .93 and it seemed to add some friction to the scrolling and cut down on the runaway effect.

jay@moduscreate.com
19 Oct 2010, 9:04 AM
eh, ok. If you plan on releasing your app with .93 code, best of luck. I would say it's worth the investment in adapting your code to the .97 or 1.0 version.

neural
19 Oct 2010, 9:07 AM
The problem is that .97 is buggy when it comes to scrolling panels. Not to mention we have a requirement that a user is able to click a panel and it'll open up and show more information. Bascially I add a class that sets a wider width on the panel which reveals the more info and then calls the scroller doLayout() function. Once it does that in .96/.97 the scroller locks onto the mouse movement and doesn't let go. Hopefully the 1.0 version will fix this, but in the meantime .93 is working as it should.

jay@moduscreate.com
19 Oct 2010, 9:13 AM
Can you produce the issues with vanilla code?

Kask
19 Oct 2010, 10:26 PM
neural, I had the same problems with scrolling and such after releases. But I can assure you that the 0.97 isnt buggy, things have just changed in implementation so you have to do some adapting.

Every release it takes me maybe 3-4 hours just adapting, but it have been worth it every time.

Im confused tho, you say that the scroller locks onto the mouse movement? The intended targets for Sencha Touch doesnt have a mouse. If you test your code in the simulator or on a device, do you get the same behavior?