Skip to content

Commit

Permalink
fix: slideInView emitting with pagination closes:#12
Browse files Browse the repository at this point in the history
  • Loading branch information
koleCar committed Feb 28, 2019
1 parent b80af8f commit 95760ec
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 2 additions & 0 deletions projects/ng-slider/src/lib/slides/slides.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export class SlidesComponent implements OnInit, AfterViewInit, OnDestroy {
index: num,
slide: this.slides.toArray()[num]
});

this._shouldEmitSlideInView(this.options.blocksPerView, false);
});
}

Expand Down
1 change: 0 additions & 1 deletion src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
padding: 0;
box-sizing: border-box;
}

6 changes: 3 additions & 3 deletions src/app/simple-example/simple-example.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>{{item.title}}</h1>
</div>
</jp-slide>
</jp-slides>
<jp-slide-pagination></jp-slide-pagination>
<button jpSlideArrow="left">Left</button>
<button jpSlideArrow="right">Right</button>
<jp-slide-pagination class="pagination"></jp-slide-pagination>
<!--<button jpSlideArrow="left">Left</button>-->
<!--<button jpSlideArrow="right">Right</button>-->
</jp-slider>
19 changes: 19 additions & 0 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,22 @@
padding: 0;
box-sizing: border-box;
}

.jp-sp-w {
width: 100%;
display: flex;
justify-content: center;
}

.jp-sp-d {
width: 12px;
height: 12px;
margin: 0 5px;
border: 2px solid black;
border-radius: 50%;
cursor: pointer;

&.active {
background: red;
}
}

0 comments on commit 95760ec

Please sign in to comment.