This repository was archived by the owner on Feb 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ Every first-level child of `<agile>` is a new slide.
64
64
| dots | boolean | ` true ` | Enable dot indicators/pagination |
65
65
| fade | boolean | ` false ` | Enable fade effect |
66
66
| infinite | boolean | ` true ` | Infinite loop sliding |
67
+ | initialSlide | integer | Slide to start on (numbered from zero) |
67
68
| mobileFirst | boolean | ` true ` | Enable mobile first calculation for responsive settings |
68
69
| options | object | ` null ` | All settings as one object |
69
70
| pauseOnHover | boolean | ` true ` | Pause autoplay when a slide is hovered |
Original file line number Diff line number Diff line change 70
70
default: true
71
71
},
72
72
73
+ initialSlide: {
74
+ type: Number ,
75
+ default: 0
76
+ },
77
+
73
78
mobileFirst: {
74
79
type: Boolean ,
75
80
default: true
147
152
autoplayStatus: false ,
148
153
autoplayTimeout: null ,
149
154
allSlidesCount: 0 ,
150
- currentSlide: 0 ,
155
+ currentSlide: null ,
151
156
mouseDown: false ,
152
157
dragStartX: 0 ,
153
158
dragStaryY: 0 ,
162
167
track: 0
163
168
},
164
169
defaultSettings: {
165
- prevArrow: this .prevArrow ,
166
- nextArrow: this .nextArrow ,
167
170
arrows: this .arrows ,
168
171
autoplay: this .autoplay ,
169
172
autoplaySpeed: this .autoplaySpeed ,
170
173
dots: this .dots ,
171
174
fade: this .fade ,
172
175
infinite: this .infinite ,
176
+ initialSlide: this .initialSlide ,
177
+ nextArrow: this .nextArrow ,
173
178
pauseOnDotsHover: this .pauseOnDotsHover ,
174
179
pauseOnHover: this .pauseOnHover ,
180
+ prevArrow: this .prevArrow ,
175
181
responsive: this .responsive ,
176
182
slidesToScroll: this .slidesToScroll ,
177
183
slidesToShow: this .slidesToShow ,
576
582
this .transform = 0
577
583
} else {
578
584
this .width .track = this .width .slide * this .allSlidesCount
585
+
586
+ if (this .currentSlide === null ) {
587
+ this .currentSlide = this .settings .initialSlide
588
+ }
589
+
579
590
this .goTo (this .currentSlide , false , false )
580
591
}
581
592
},
You can’t perform that action at this time.
0 commit comments