Skip to content

Commit

Permalink
fix: revert get new wrapperInnerEl width on slides changes
Browse files Browse the repository at this point in the history
  • Loading branch information
makiJS committed May 21, 2020
1 parent 1f325a9 commit 7c24cd6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions projects/ng-slider/src/lib/slides/slides.component.ts
Expand Up @@ -236,13 +236,11 @@ export class SlidesComponent implements OnInit, AfterViewInit, OnDestroy {

this.cdr.detectChanges();

setTimeout(() => {
this.slideWidthPercentage =
((<HTMLElement>this.wrapperInnerEl.nativeElement.children[0])
.getBoundingClientRect().width /
this.wrapperInnerEl.nativeElement.getBoundingClientRect().width) *
100;
});
this.slideWidthPercentage =
((<HTMLElement>this.wrapperInnerEl.nativeElement.children[0])
.getBoundingClientRect().width /
this.wrapperInnerEl.nativeElement.getBoundingClientRect().width) *
100;

this.maxLeft =
-this.slideWidthPercentage *
Expand Down

0 comments on commit 7c24cd6

Please sign in to comment.