Skip to content

Commit 687e132

Browse files
committed
Fix Direction.resolve for rtl
1 parent 87b3be2 commit 687e132

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/components/direction.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { define } from '../utils/object'
44
const VALID_DIRECTIONS = ['ltr', 'rtl']
55
const FLIPED_MOVEMENTS = {
66
'>': '<',
7-
'<': '>',
8-
'=': '='
7+
'<': '>'
98
}
109

1110
export default function (Glide, Components, Events) {
@@ -26,10 +25,10 @@ export default function (Glide, Components, Events) {
2625
* @returns {String}
2726
*/
2827
resolve (pattern) {
29-
const token = pattern.slice(0, 1)
30-
3128
if (this.is('rtl')) {
32-
return pattern.split(token).join(FLIPED_MOVEMENTS[token])
29+
return pattern.split('').map(function (c) {
30+
return FLIPED_MOVEMENTS[c] || c
31+
}).join('')
3332
}
3433

3534
return pattern

0 commit comments

Comments
 (0)