I have found an alternative to the
Scroller kind in Enyo 1.0. It is working great in Android, probably iOS too.
Add
GloveBox.js to your project and depends.js file.
Then add the snappy
GloveBoxScroller kind:
enyo.kind({
name: "GloveBoxScroller",
kind: "Control",
create: function() {
this.inherited(arguments);
},
rendered: function() {
this.inherited(arguments);
var gloveBox = new GloveBox(this.parent.id);
}
});
Replace any
Scoller kind with
GloveBoxScroller and enjoy fast smooth scrolling!
This is just a start. There's lot to do but it will get us going.
Bug: Keeping the scrolling within the parent element!
0 • •
Comments
Does this also make scrolling faster on webOS phones?
- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •http://scrolltest.datajog.com
It does work in the webOS phone browser! It does not work as an app.
- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •The accelerated scroller in Enyo uses the same mechanism, but without the scale3D transform, see TransformScroller.js.
So, either the scale transform parameter is really important, or there's other magic here. From the looks of the code, this.scale doesn't seem to matter much if you're not doing pinch-zoom, so I'm guessing the second.
One thing I notice is that it uses the webkit-transition style to set different transitions. This means that scrolling isn't just happening when the style changes, but happens under webkit control, so instead of setting the style to change the scroll to 20, then 30, then 40, etc, they just set the scroll to 40 and let the transition logic handle the intermediate steps. This is something that Enyo code doesn't do, making the Enyo code a bit more JS runtime heavy.
- Spam
- Abuse
0 • Off Topic Insightful •I tried adding the scale3D to my Enyo source and saw no real improvement on my iPod. Looks like it's not the magic bullet.
- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •When I have more, I'll post it.
Scott
- Spam
- Abuse
0 • Off Topic Insightful •