Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(InViewport): export directive to be able to trigger inviewport c…
…heck manually fix #9
- Loading branch information
1 parent
50c9112
commit 9903a0c
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
<h1>Scroll down ↓ and right →</h1> | ||
|
||
<div class="spacer"></div> | ||
<p class="small-element" snInViewport (inViewportChange)="onInViewportChange($event)" [ngClass]="{'highlight': highlight}">Amet tempor excepteur occaecat nulla. Aute deserunt esse duis velit mollit exercitation nisi officia. Anim do irure cillum esse esse ea magna elit. Velit reprehenderit eiusmod aliqua do reprehenderit elit commodo enim do deserunt consequat ea elit. Incididunt dolore officia consectetur anim ex ea commodo ullamco veniam ipsum esse amet cupidatat commodo. Id consequat duis aliqua minim aliquip enim officia elit. Sint est fugiat ex ex proident ad veniam do excepteur.</p> | ||
|
||
<p | ||
class="small-element" | ||
snInViewport | ||
(inViewportChange)="onInViewportChange($event)" | ||
[ngClass]="{'highlight': highlight}"> | ||
Amet tempor excepteur occaecat nulla. Aute deserunt esse duis velit mollit exercitation nisi officia. Anim do irure cillum esse esse ea magna elit. Velit reprehenderit eiusmod aliqua do reprehenderit elit commodo enim do deserunt consequat ea elit. Incididunt dolore officia consectetur anim ex ea commodo ullamco veniam ipsum esse amet cupidatat commodo. Id consequat duis aliqua minim aliquip enim officia elit. Sint est fugiat ex ex proident ad veniam do excepteur. | ||
</p> | ||
|
||
<p class="large-element" snInViewport>very large element</p> | ||
|
||
<button (click)="insideScrollable.calculateInViewportStatus()">Check</button> | ||
<div class="scrollable" #container> | ||
|
||
<div class="spacer"></div> | ||
<p class="inside-scrollable" snInViewport [parent]="container">Element inside scrollable div</p> | ||
|
||
<p | ||
#insideScrollable="snInViewport" | ||
class="inside-scrollable" | ||
snInViewport | ||
[parent]="container"> | ||
Element inside scrollable div | ||
</p> | ||
|
||
<div class="spacer"></div> | ||
|
||
</div> | ||
|
||
<div class="spacer"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters