From b5b627cf71bebf6dc7fcfdc7284a44065d378e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20B=C5=82a=C5=BCejewicz=20=28Peter=20Blazejewicz=29?= Date: Wed, 8 Jul 2020 23:11:54 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#45742=20fix(glider?= =?UTF-8?q?-js):=20add=20`eventPropagate`=20option=20by=20@peterblazejewic?= =?UTF-8?q?z?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(glider-js): add `eventPropagate` option - missing `eventPropagate` option: https://github.com/NickPiscitelli/Glider.js/blob/e0743bc3fc4da0977ab778c375f6a98e48d0cfb6/README.md#L90 This specific option is missin public facing documentation, see: NickPiscitelli/Glider.js#111 /cc @martin-badin Thanks! * [pr] remove `propagateEvent` property as per review request /cc @martin-badin --- types/glider-js/glider-js-tests.ts | 1 + types/glider-js/index.d.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/types/glider-js/glider-js-tests.ts b/types/glider-js/glider-js-tests.ts index a48f8bcec4..598b6303aa 100644 --- a/types/glider-js/glider-js-tests.ts +++ b/types/glider-js/glider-js-tests.ts @@ -7,6 +7,7 @@ const options: Glider.Options = { prev: '.glider-prev', next: document.querySelector('.glider-next'), }, + eventPropagate: true, }; // Options.dots diff --git a/types/glider-js/index.d.ts b/types/glider-js/index.d.ts index ccb9d86c32..cd35aa02d6 100644 --- a/types/glider-js/index.d.ts +++ b/types/glider-js/index.d.ts @@ -121,12 +121,6 @@ declare namespace Glider { */ itemWidth?: number; - /** - * Whether or not Glider.js events should bubble (useful for binding - * events to all carousels) - */ - propagateEvent?: boolean; - /** * If true, Glider.js will lock to the nearest slide on resizing of * the window @@ -162,6 +156,12 @@ declare namespace Glider { */ scrollPropagate?: boolean; + /** + * Whether or not the event bubbles up from the container + * @default true + */ + eventPropagate?: boolean; + /** * Whether or not Glider.js should skip wrapping its children with a * 'glider-track'
.