Permalink
Browse files

Merge branch '370pr4+pr260+pr261'

  • Loading branch information...
2 parents b3d5186 + 5f2658c commit be8267911e881525bd12fd9f9b97d55b3c09a5a4 @derek derek committed Sep 15, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -339,7 +339,7 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
// origY = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).f,
origX = sv.get(SCROLL_X),
origY = sv.get(SCROLL_Y),
- HWTransform,
+ origHWTransform,
dims;
// TODO: Is this OK? Just in case it's called 'during' a transition.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -339,7 +339,7 @@ Y.ScrollView = Y.extend(ScrollView, Y.Widget, {
// origY = (new WebKitCSSMatrix(cb.getComputedStyle("transform"))).f,
origX = sv.get(SCROLL_X),
origY = sv.get(SCROLL_Y),
- HWTransform,
+ origHWTransform,
dims;
// TODO: Is this OK? Just in case it's called 'during' a transition.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -370,22 +370,26 @@ Y.extend(PaginatorPlugin, Y.Plugin.Base, {
*/
_afterIndexChange: function (e) {
var paginator = this,
- host = this._host,
+ host = paginator._host,
index = e.newVal,
- maxScrollX = paginator._pageDims[index].maxScrollX,
- maxScrollY = paginator._pageDims[index].maxScrollY,
- gesture = host._gesture,
- gestureAxis = gesture && gesture.axis;
+ pageDims = paginator._pageDims[index],
+ hostAxis = host._cAxis,
+ paginatorAxis = paginator._cAxis;
// Cache the new index value
paginator._cIndex = index;
- if (gestureAxis === DIM_Y) {
- host._maxScrollX = maxScrollX;
- host.set(SCROLL_X, paginator._pageDims[index].scrollX, { src: UI });
- } else if (gestureAxis === DIM_X) {
- host._maxScrollY = maxScrollY;
- host.set(SCROLL_Y, paginator._pageDims[index].scrollY, { src: UI });
+ // For dual-axis instances, we need to hack some host properties to the
+ // current page's max height/width and current stored offset
+ if (hostAxis[DIM_X] && hostAxis[DIM_Y]) {
+ if (paginatorAxis[DIM_Y]) {
+ host._maxScrollX = pageDims.maxScrollX;
+ host.set(SCROLL_X, pageDims.scrollX, { src: UI });
+ }
+ else if (paginatorAxis[DIM_X]) {
+ host._maxScrollY = pageDims.maxScrollY;
+ host.set(SCROLL_Y, pageDims.scrollY, { src: UI });
+ }
}
if (e.src !== UI) {
Oops, something went wrong.

0 comments on commit be82679

Please sign in to comment.