This repository was archived by the owner on Feb 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" agile"
2
+ <div class =" agile" ref = " agile "
3
3
:class =" {'agile--fade': settings.fade && !settings.unagile, 'agile--disabled': settings.unagile}" >
4
4
<div ref =" list" class =" agile__list" >
5
5
<div ref =" track" class =" agile__track"
6
- :style =" {width: width.track + 'px', transform: 'translate(-' + transform + 'px)', transition: 'transform ' + settings.timing + ' ' + transitionDelay + 'ms'}"
6
+ :style =" {width: width.track + 'px', transform: 'translate(' + (isArabic ? '' : '-') + transform + 'px)', transition: 'transform ' + settings.timing + ' ' + transitionDelay + 'ms'}"
7
7
@mouseover =" handleMouseOver('track')" @mouseout =" handleMouseOut('track')" >
8
8
<slot ></slot >
9
9
</div >
162
162
timing: this .timing ,
163
163
unagile: this .unagile
164
164
},
165
- settings: {}
165
+ settings: {},
166
+ isArabic: false
166
167
}
167
168
},
168
169
213
214
214
215
// Get width on start
215
216
this .getWidth ()
217
+
218
+ // check if it is in arabic environment
219
+ this .isArabic = getComputedStyle (this .$refs .agile ).direction === ' rtl'
216
220
},
217
221
218
222
beforeDestroy () {
509
513
510
514
// Prepare slides for fade mode
511
515
if (this .settings .fade && ! this .settings .unagile ) {
512
- this .slides [i].style .transform = ' translate(- ' + i * this .width .slide + ' px)'
516
+ this .slides [i].style .transform = ' translate(' + ( this . isArabic ? ' ' : ' - ' ) + i * this .width .slide + ' px)'
513
517
} else {
514
518
this .slides [i].style .transform = ' translate(0)'
515
519
}
You can’t perform that action at this time.
0 commit comments