Skip to content

Commit ba64b1a

Browse files
author
Cedric Franke
committed
close #4 Build features to use component in web-component-designer -> intervall default to 0
1 parent 007b367 commit ba64b1a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/slider/AutomaticSliderShowWebcomponent.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class AutomaticSliderShowWebcomponent extends BaseCustomWebComponentConst
9292

9393
private _dots: HTMLDivElement;
9494
private _slideIndex = 0;
95-
private _interval: number = 2000;
95+
private _interval: number = 0;
9696
private _timeoutId: any;
9797
private _observer: MutationObserver;
9898

@@ -166,8 +166,10 @@ export class AutomaticSliderShowWebcomponent extends BaseCustomWebComponentConst
166166

167167
this._slideIndex++;
168168
// console.log(this._slideIndex);
169-
clearTimeout(this._timeoutId);
170-
this._timeoutId = setTimeout(() => this._showSlides(), this._interval);
169+
if (this._interval != 0) {
170+
clearTimeout(this._timeoutId);
171+
this._timeoutId = setTimeout(() => this._showSlides(), this._interval);
172+
}
171173
}
172174

173175
prevSlide() {

0 commit comments

Comments
 (0)