-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(tour): improve performance of the guided tour (#803)
- [x] scroll a highlighted element into view; - [x] attach an elevation class to the highlighted element;
- Loading branch information
Showing
4 changed files
with
55 additions
and
11 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
56 changes: 48 additions & 8 deletions
56
...ent-guided-tour/src/lib/components/guided-tour-example/guided-tour-example.component.html
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,21 +1,61 @@ | ||
<p>... Some content ...</p> | ||
@if (!tour.active) { | ||
<button mat-raised-button color="accent" (click)="tour.next()">Start tour</button> | ||
} @else { | ||
<button mat-raised-button color="warn" (click)="tour.end()">End tour</button> | ||
} | ||
|
||
<ng-container *ngIf="tourConig$() as config"> | ||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<div [appGuidedTour]="config.at(1)" [highlightElement]="true">second item to explain</div> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<div [appGuidedTour]="config.at(2)" [highlightElement]="true">third item to explain</div> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<div [appGuidedTour]="config.at(0)">first item to explain</div> | ||
</ng-container> | ||
|
||
<p>... Some content ...</p> | ||
<p>... Some content ...</p> | ||
|
||
@if (!tour.active) { | ||
<button mat-raised-button color="accent" (click)="tour.next()">Start tour</button> | ||
} @else { | ||
<button mat-raised-button color="warn" (click)="tour.end()">End tour</button> | ||
} | ||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
|
||
<p>... Some content ...</p> | ||
</ng-container> |
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