From ad57a5f2d71ee4d078d53c0582758c7682ca92be Mon Sep 17 00:00:00 2001 From: Vincent Orback Date: Wed, 7 Feb 2018 10:59:22 +0100 Subject: [PATCH 1/2] remove deprecated and added missing options --- README.md | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 059f1ad..b842120 100644 --- a/README.md +++ b/README.md @@ -89,21 +89,25 @@ instance.destroy(); ``` # Options - * pageClass: classname selector for all elments that should provide a page - * direction: "horizontal" or "vertical" - * minDragDistance: minuimum distance (in pixel) the user has to drag to trigger swip - * page: Number of page to load on start - * scribe: pixel value for a possible scribe - * onSwipeStart: callback function before the animation - * onSwipeEnd: callback function after the animation - * onDrag: callback on drag - * onDragEnd: callback on dragend - * afterInitialize: - * borderBetweenPages: if you need space between pages add a pixel value - * duration - * hammerSettings - * preventDrag: if want to prevent user interactions and only swipe manualy - * disableScroll: prevent scroll on mobile version + Default value in parenthesize. + * `pageClass`: classname of page elements. (`"dragend-page"`) + * `direction` : "horizontal" or "vertical" direction of transitions. (`"horizontal"`) + * `minDragDistance` : minuimum distance (in pixels) the user has to drag to trigger swipe. (`"40"`) + * `onSwipeStart`: callback before page transition + * `onSwipeEnd`: callback after transition + * `onDragStart`: callback on drag start + * `onDrag`: callback on drag + * `onDragEnd`: callback on drag end + * `afterInitialize`: called after the pages are sized + * `keyboardNavigation`: if you want to enable keyboard navigation. (`false`) + * `stopPropagation`: prevent event bubbling. (`false`) + * `itemsInPage`: number of items in a page . (`1`) + * `scribe`: pixel value for a possible scribe . (`0`) + * `page`: number of the page to load on start. (`1`) + * `borderBetweenPages`: gap (in pixels) between pages. (`0`) + * `duration`: transition duration. (`300`) + * `preventDrag`: prevent user interactions and only swipe manually. (`false`) + * `disableScroll`: prevent touch scroll. (`false`) # CHANGELOG From c3406a8a9e558f0b62e66d0b9fd6ba0256e56c0a Mon Sep 17 00:00:00 2001 From: Vincent Orback Date: Wed, 7 Feb 2018 11:05:38 +0100 Subject: [PATCH 2/2] sync options descriptions in lib with readme --- README.md | 8 ++++---- dragend.js | 27 ++++++++++++++------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index b842120..1590851 100644 --- a/README.md +++ b/README.md @@ -92,19 +92,19 @@ instance.destroy(); Default value in parenthesize. * `pageClass`: classname of page elements. (`"dragend-page"`) * `direction` : "horizontal" or "vertical" direction of transitions. (`"horizontal"`) - * `minDragDistance` : minuimum distance (in pixels) the user has to drag to trigger swipe. (`"40"`) + * `minDragDistance` : minimum distance (in pixels) the user has to drag to trigger swipe. (`"40"`) * `onSwipeStart`: callback before page transition - * `onSwipeEnd`: callback after transition + * `onSwipeEnd`: callback after page transition * `onDragStart`: callback on drag start * `onDrag`: callback on drag * `onDragEnd`: callback on drag end * `afterInitialize`: called after the pages are sized * `keyboardNavigation`: if you want to enable keyboard navigation. (`false`) - * `stopPropagation`: prevent event bubbling. (`false`) + * `stopPropagation`: prevent event propagation. (`false`) * `itemsInPage`: number of items in a page . (`1`) * `scribe`: pixel value for a possible scribe . (`0`) * `page`: number of the page to load on start. (`1`) - * `borderBetweenPages`: gap (in pixels) between pages. (`0`) + * `borderBetweenPages`: space (in pixels) between pages. (`0`) * `duration`: transition duration. (`300`) * `preventDrag`: prevent user interactions and only swipe manually. (`false`) * `disableScroll`: prevent touch scroll. (`false`) diff --git a/dragend.js b/dragend.js index 009b4c0..4532106 100644 --- a/dragend.js +++ b/dragend.js @@ -59,22 +59,23 @@ // // You can use the following options: // - // * pageClass: classname selector for all elments that should provide a page + // * pageClass: classname of page elements // * direction: "horizontal" or "vertical" - // * minDragDistance: minuimum distance (in pixel) the user has to drag - // to trigger swip - // * page: Number of page to load on start - // * scribe: pixel value for a possible scribe - // * onSwipeStart: callback function before the animation - // * onSwipeEnd: callback function after the animation + // * minDragDistance: minimum distance (in pixels) the user has to drag to trigger swipe + // * onSwipeStart: callback before page transition + // * onSwipeEnd: callback after page transition // * onDragStart: called on drag start // * onDrag: callback on drag - // * onDragEnd: callback on dragend - // * borderBetweenPages: if you need space between pages add a pixel value - // * duration - // * stopPropagation - // * afterInitialize called after the pages are size - // * preventDrag if want to prevent user interactions and only swipe manualy + // * onDragEnd: callback on drag end + // * afterInitialize: called after the pages are sized + // * keyboardNavigation: if you want to enable keyboard navigation + // * stopPropagation: prevent event propagation + // * itemsInPage: number of items in a page + // * scribe: pixel value for a possible scribe + // * page: number of the page to load on start + // * borderBetweenPages: space (in pixels) between pages + // * preventDrag: prevent user interactions and only swipe manually + // * disableScroll: prevent touch scroll var