| Page 1 of 1 | [ 5 posts ] |
|
I face a problem that when I trying to make two button to control the pages of scroll view.
Like this. ![]() When the button is clicked, scroll view should scroll to page 2. It works just fine under IE&FF like this. ![]() When using chrome, not frequently, but sometimes it scroll too much. Like this. ![]() I think padding cause this. Somehow it calculates the wrong value to scroll when the first move. http://raytjwen.droppages.com/yui3_scv_test.html This demo page is simplified version of what I need. Is that anything I can try to resolve this problem? Thanks for any suggestion. |
|
Hmm... I'm unable to reproduce on Chrome (v19). Anyone else able to replicate the issue?
|
|
I can understand. It's really hard to reproduce.
After some experiment, I found that no matter "parent's padding" or "self margin" will cause this strange situation (by chance). So I try different styling way. Using "children's margin" to make the same looks. And it works just fine, so far. But I have another question is how to slow down the animation speed when page changing? I have try Code: Y.one('.lf-btn').on('click', function(E) {mySCV.pages.scrollTo(0, 1000, 'linear');}); Y.one('.rt-btn').on('click', function(E) {mySCV.pages.scrollTo(1, 5000, 'linear');}); It doesn't work and the animation seems the same. This is the demo page: http://raytjwen.droppages.com/yui3_scv_test.html Thanks for any response. |
Juan Ignacio DopazoYUI Contributor
|
That last one is a bug. I looked into it and there's a badly written ternary operator in ScrollView. You can use this patch to make it work:
Code: Y.ScrollView.prototype._uiScrollTo = function (x, y, duration, easing) { duration = duration || (this._snapToEdge ? 400 : 0); easing = easing || (this._snapToEdge ? ScrollView.SNAP_EASING : null); this.scrollTo(x, y, duration, easing); }; |
|
Thank you, Juan.
I'll try this. Best regards, Ray |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group