Skip to content

Commit fdb27fd

Browse files
committed
Merge branch 'master' into feature-add-slideout-events
2 parents fa907b3 + a14eaa3 commit fdb27fd

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ Create a new instance of `Slideout`.
193193
- `[options.fx]` (String) - The CSS effect to use when animating the opening and closing of the slideout. Default: `ease`.
194194
- `[options.padding]` (Number) - Default: `256`.
195195
- `[options.tolerance]` (Number) - Default: `70`.
196+
- `[options.touch]` (Boolean) - Set this option to false to disable Slideout touch events. Default: `true`.
196197

197198
```js
198199
var slideout = new Slideout({

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ function Slideout(options) {
5959
this._moved = false;
6060
this._opened = false;
6161
this._preventOpen = false;
62+
this._touch = options.touch == undefined ? true : options.touch && true;
6263

6364
// Sets panel
6465
this.panel = options.panel;
@@ -75,7 +76,9 @@ function Slideout(options) {
7576
this._padding = parseInt(options.padding, 10) || 256;
7677

7778
// Init touch events
78-
this._initTouchEvents();
79+
if(this._touch) {
80+
this._initTouchEvents();
81+
}
7982
}
8083

8184
/**

test/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ describe('Slideout', function () {
8383
'_fx',
8484
'_duration',
8585
'_tolerance',
86-
'_padding'
86+
'_padding',
87+
'_touch'
8788
];
8889
var i = 0;
8990
var len = properties.length;

0 commit comments

Comments
 (0)