Skip to content

Commit

Permalink
Enable/disable mw control
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Apr 9, 2014
1 parent c55cfe0 commit 914ec67
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/idangerous.swiper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,19 @@ var Swiper = function (selector, params) {
else e.returnValue = false;
return false;
}
_this.disableMousewheelControl = function () {
if (!_this._wheelEvent) return false;
params.mousewheelControl = false;
_this.h.removeEventListener(_this.container, _this._wheelEvent, handleMousewheel);
return true;
};

_this.enableMousewheelControl = function () {
if (!_this._wheelEvent) return false;
params.mousewheelControl = true;
_this.h.addEventListener(_this.container, _this._wheelEvent, handleMousewheel);
return true;
};

/*=========================
Grab Cursor
Expand Down

0 comments on commit 914ec67

Please sign in to comment.