Permalink
Browse files

minor cleanup

  • Loading branch information...
1 parent 11db9dd commit ddc7a71664c5726214836e92876fbf76734b09c1 @curtisharvey committed Aug 9, 2012
Showing with 7 additions and 7 deletions.
  1. +4 −4 dualaxispaginator/paginator-plugin.js
  2. +3 −3 dualaxispaginator/scrollview-base.js
@@ -326,8 +326,8 @@ YUI.add('paginator-plugin', function (Y, NAME) {
var paginator = this,
host = this._host,
index = paginator._cIndex,
- scrollX = host.get('scrollX'),
- scrollY = host.get('scrollY'),
+ scrollX = host.get(SCROLL_X),
+ scrollY = host.get(SCROLL_Y),
paginatorAxis = paginator.get(AXIS);
if (paginatorAxis === DIM_Y) {
@@ -357,10 +357,10 @@ YUI.add('paginator-plugin', function (Y, NAME) {
if (gestureAxis === DIM_Y) {
host._maxScrollX = maxScrollX;
- host.set('scrollX', paginator.cards[index].scrollX, { src: 'ui' });
+ host.set(SCROLL_X, paginator.cards[index].scrollX, { src: UI });
} else if (gestureAxis === DIM_X) {
host._maxScrollY = maxScrollY;
- host.set('scrollY', paginator.cards[index].scrollY, { src: 'ui' });
+ host.set(SCROLL_Y, paginator.cards[index].scrollY, { src: UI });
}
// Cache the new index value
@@ -154,7 +154,7 @@ YUI.add('scrollview-base', function (Y, NAME) {
_bindMousewheel: function (mousewheel) {
var sv = this,
axisY = sv.get(AXIS_Y);
-
+
// Only enable for vertical scrollviews
if (mousewheel && axisY) {
Y.one(DOC).on(MOUSEWHEEL, Y.bind(sv._mousewheel, sv));
@@ -321,6 +321,7 @@ YUI.add('scrollview-base', function (Y, NAME) {
sv.set(SCROLL_X, x, { src: 'ui' });
sv.set(SCROLL_Y, y, { src: 'ui' });
+
sv.scrollTo(x, y, duration, easing, node);
},
@@ -770,12 +771,11 @@ YUI.add('scrollview-base', function (Y, NAME) {
*/
_afterScrollChange: function (e) {
var sv = this,
- gesture = sv._gesture,
duration = e.duration,
easing = e.easing,
val = e.newVal;
- if (e.src !== UI) {
+ if (e.src !== ScrollView.UI_SRC) {
if (e.attrName === SCROLL_X) {
sv.scrollTo(val, sv.get(SCROLL_Y), duration, easing);
} else {

0 comments on commit ddc7a71

Please sign in to comment.