From 6758e12d320a01570274d5d8916dcf1cf18934c0 Mon Sep 17 00:00:00 2001 From: Amir hossein Karimi Date: Fri, 19 Mar 2021 15:03:41 +0330 Subject: [PATCH] Fix isRTL option passed to ShuffleItem class --- src/shuffle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shuffle.js b/src/shuffle.js index d13e860..a661506 100644 --- a/src/shuffle.js +++ b/src/shuffle.js @@ -337,7 +337,7 @@ class Shuffle extends TinyEmitter { _getItems() { return Array.from(this.element.children) .filter((el) => matches(el, this.options.itemSelector)) - .map((el) => new ShuffleItem(el, this.options)); + .map((el) => new ShuffleItem(el, this.options.isRTL)); } /** @@ -862,7 +862,7 @@ class Shuffle extends TinyEmitter { * @param {Element[]} newItems Collection of new items. */ add(newItems) { - const items = arrayUnique(newItems).map((el) => new ShuffleItem(el, this.options)); + const items = arrayUnique(newItems).map((el) => new ShuffleItem(el, this.options.isRTL)); // Add classes and set initial positions. this._initItems(items);