From 89c3bdb1cf981e2bda069c6941d96a462a4897b6 Mon Sep 17 00:00:00 2001 From: Hyunje Alex Jun Date: Mon, 26 Jan 2015 16:09:55 +0000 Subject: [PATCH] Fix typos. --- src/js/lib/helper.js | 2 +- src/js/plugin/initialize.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/lib/helper.js b/src/js/lib/helper.js index 02e9954..648698f 100644 --- a/src/js/lib/helper.js +++ b/src/js/lib/helper.js @@ -31,7 +31,7 @@ exports.clone = function (obj) { exports.extend = function (original, source) { var result = this.clone(original); for (var key in source) { - result = this.clone(source[key]); + result[key] = this.clone(source[key]); } return result; }; diff --git a/src/js/plugin/initialize.js b/src/js/plugin/initialize.js index 6099e10..3000994 100644 --- a/src/js/plugin/initialize.js +++ b/src/js/plugin/initialize.js @@ -218,18 +218,18 @@ module.exports = function (element, userSettings) { // only vertical scrollbar is active and useBothWheelAxes option is // active, so let's scroll vertical bar using both mouse wheel axes if (deltaY) { - element.scrollTop = element.scrollTop() - (deltaY * i.settings.wheelSpeed); + element.scrollTop = element.scrollTop - (deltaY * i.settings.wheelSpeed); } else { - element.scrollTop = element.scrollTop() + (deltaX * i.settings.wheelSpeed); + element.scrollTop = element.scrollTop + (deltaX * i.settings.wheelSpeed); } shouldPrevent = true; } else if (i.scrollbarXActive && !i.scrollbarYActive) { // useBothWheelAxes and only horizontal bar is active, so use both // wheel axes for horizontal bar if (deltaX) { - element.scrollLeft = element.scrollLeft() + (deltaX * i.settings.wheelSpeed); + element.scrollLeft = element.scrollLeft + (deltaX * i.settings.wheelSpeed); } else { - element.scrollLeft = element.scrollLeft() - (deltaY * i.settings.wheelSpeed); + element.scrollLeft = element.scrollLeft - (deltaY * i.settings.wheelSpeed); } shouldPrevent = true; }