|
1 | 1 | <mat-card> |
2 | | - <mat-card-title id="title">Namespace scrolling</mat-card-title> |
3 | | - <p> |
4 | | - This page demonstrates the interaction with running scroll animation, especially if there are multiple ones. |
5 | | - Each scroll animation belongs to a <code>namespace</code>. The default namespace value is <i>default</i>. Whenever a |
6 | | - new scroll animation for the same namespace is started, all running ones will be stopped. This is allows to prevent |
7 | | - two scrolling animations acting on the same scrollView DOM element, where each interferes with the other ones. |
8 | | - All scroll animations on the same scrollView should thus share the same namespace. |
9 | | - </p> |
| 2 | + <mat-card-header> |
| 3 | + <mat-card-title id="title">Namespace scrolling</mat-card-title> |
| 4 | + </mat-card-header> |
| 5 | + <mat-card-content> |
| 6 | + <p> |
| 7 | + This page demonstrates the interaction with running scroll animation, especially if there are multiple ones. |
| 8 | + Each scroll animation belongs to a <code>namespace</code>. The default namespace value is <i>default</i>. Whenever a |
| 9 | + new scroll animation for the same namespace is started, all running ones will be stopped. This is allows to prevent |
| 10 | + two scrolling animations acting on the same scrollView DOM element, where each interferes with the other ones. |
| 11 | + All scroll animations on the same scrollView should thus share the same namespace. |
| 12 | + </p> |
| 13 | + </mat-card-content> |
10 | 14 | </mat-card> |
11 | 15 |
|
12 | | -<mat-card class="flex-mat-card-container"> |
13 | | - |
14 | | - <div class="flex-container"> |
15 | | - <h3 class="flex-header">Namespace <code>default</code></h3> |
16 | | - <button mat-raised-button color="primary" (click)="startDefaultNamespaceScrolls()" |
17 | | - id="startDefaultNamespaceScrollsButton" matTooltip="Start scroll animation"> |
18 | | - <mat-icon>play_arrow</mat-icon> |
19 | | - </button> |
20 | | - <button mat-raised-button color="primary" (click)="pageScrollService.stopAll('default')" |
21 | | - id="stopDefaultNamespaceScrollsButton" matTooltip="Stop scroll animation"> |
22 | | - <mat-icon>stop</mat-icon> |
23 | | - </button> |
24 | | - <button mat-raised-button color="primary" (click)="resetDefaultNameScrolls()" |
25 | | - id="resetDefaultNamespaceScrollsButton" matTooltip="Scroll container to top"> |
26 | | - <mat-icon>replay</mat-icon> |
27 | | - </button> |
28 | | - </div> |
29 | | - |
30 | | - <div class="flex-container"> |
31 | | - <h3 class="flex-header">Namespace <code>customSpace</code></h3> |
32 | | - <button mat-raised-button color="primary" (click)="startCustomNamespaceScroll()" |
33 | | - id="startCustomNamespaceScrollsButton" matTooltip="Start scroll animation"> |
34 | | - <mat-icon>play_arrow</mat-icon> |
35 | | - </button> |
36 | | - <button mat-raised-button color="primary" (click)="pageScrollService.stopAll('customSpace')" |
37 | | - id="stopCustomNamespaceScrollsButton" matTooltip="Stop scroll animation"> |
38 | | - <mat-icon>stop</mat-icon> |
39 | | - </button> |
40 | | - <button mat-raised-button color="primary" (click)="resetCustomNamespaceScroll()" |
41 | | - id="resetCustomNamespaceScrollsButton" matTooltip="Scroll container to top"> |
42 | | - <mat-icon>replay</mat-icon> |
43 | | - </button> |
44 | | - </div> |
45 | | - <div class="flex-container"> |
46 | | - <h3 class="flex-header">All Namespaces</h3> |
47 | | - <button mat-raised-button color="primary" (click)="pageScrollService.stopAll()" |
48 | | - id="stopAllNamespaceScrollsButton" matTooltip="Stop all scroll animations"> |
49 | | - <mat-icon>stop</mat-icon> |
50 | | - </button> |
51 | | - </div> |
| 16 | +<mat-card> |
| 17 | + <mat-card-content class="flex-mat-card-container"> |
| 18 | + <div class="flex-container"> |
| 19 | + <h3 class="flex-header">Namespace <code>default</code></h3> |
| 20 | + <button mat-mini-fab color="primary" (click)="startDefaultNamespaceScrolls()" |
| 21 | + id="startDefaultNamespaceScrollsButton" matTooltip="Start scroll animation"> |
| 22 | + <mat-icon>play_arrow</mat-icon> |
| 23 | + </button> |
| 24 | + <button mat-mini-fab color="primary" (click)="pageScrollService.stopAll('default')" |
| 25 | + id="stopDefaultNamespaceScrollsButton" matTooltip="Stop scroll animation"> |
| 26 | + <mat-icon>stop</mat-icon> |
| 27 | + </button> |
| 28 | + <button mat-mini-fab color="primary" (click)="resetDefaultNameScrolls()" |
| 29 | + id="resetDefaultNamespaceScrollsButton" matTooltip="Scroll container to top"> |
| 30 | + <mat-icon>replay</mat-icon> |
| 31 | + </button> |
| 32 | + </div> |
| 33 | + |
| 34 | + <div class="flex-container"> |
| 35 | + <h3 class="flex-header">Namespace <code>customSpace</code></h3> |
| 36 | + <button mat-mini-fab color="primary" (click)="startCustomNamespaceScroll()" |
| 37 | + id="startCustomNamespaceScrollsButton" matTooltip="Start scroll animation"> |
| 38 | + <mat-icon>play_arrow</mat-icon> |
| 39 | + </button> |
| 40 | + <button mat-mini-fab color="primary" (click)="pageScrollService.stopAll('customSpace')" |
| 41 | + id="stopCustomNamespaceScrollsButton" matTooltip="Stop scroll animation"> |
| 42 | + <mat-icon>stop</mat-icon> |
| 43 | + </button> |
| 44 | + <button mat-mini-fab color="primary" (click)="resetCustomNamespaceScroll()" |
| 45 | + id="resetCustomNamespaceScrollsButton" matTooltip="Scroll container to top"> |
| 46 | + <mat-icon>replay</mat-icon> |
| 47 | + </button> |
| 48 | + </div> |
| 49 | + <div class="flex-container"> |
| 50 | + <h3 class="flex-header">All Namespaces</h3> |
| 51 | + <button mat-mini-fab color="primary" (click)="pageScrollService.stopAll()" |
| 52 | + id="stopAllNamespaceScrollsButton" matTooltip="Stop all scroll animations"> |
| 53 | + <mat-icon>stop</mat-icon> |
| 54 | + </button> |
| 55 | + </div> |
| 56 | + </mat-card-content> |
52 | 57 | </mat-card> |
53 | 58 |
|
54 | | -<mat-card class="flex-mat-card-container"> |
55 | | - <div> |
56 | | - <h4>Namespace default</h4> |
57 | | - <div #container1 id="container1" class="scrollContainer"> |
| 59 | +<mat-card> |
| 60 | + <mat-card-content class="flex-mat-card-container"> |
| 61 | + <div> |
| 62 | + <h4>Namespace default</h4> |
| 63 | + <div #container1 id="container1" class="scrollContainer"> |
58 | 64 |
|
59 | | - <p id="container1Head"> |
60 | | - This containers scroll animation is started at the same time like the second one. |
61 | | - As both are in the same namespace, this one's will be stopped at the moment the second one starts scrolling. |
62 | | - </p> |
| 65 | + <p id="container1Head"> |
| 66 | + This containers scroll animation is started at the same time like the second one. |
| 67 | + As both are in the same namespace, this one's will be stopped at the moment the second one starts scrolling. |
| 68 | + </p> |
63 | 69 |
|
64 | | - <app-dummy-content [length]="4"></app-dummy-content> |
| 70 | + <app-dummy-content [length]="4"></app-dummy-content> |
65 | 71 |
|
66 | | - <p> |
67 | | - <button mat-raised-button color="warn" id="scrollTarget1">Target</button> |
68 | | - </p> |
| 72 | + <p> |
| 73 | + <button mat-raised-button color="warn" id="scrollTarget1">Target</button> |
| 74 | + </p> |
69 | 75 |
|
70 | | - <app-dummy-content [length]="4"></app-dummy-content> |
| 76 | + <app-dummy-content [length]="4"></app-dummy-content> |
71 | 77 |
|
| 78 | + </div> |
72 | 79 | </div> |
73 | | - </div> |
74 | 80 |
|
75 | | - <div> |
76 | | - <h4>Namespace <code>default</code></h4> |
77 | | - <div #container2 id="container2" class="scrollContainer"> |
| 81 | + <div> |
| 82 | + <h4>Namespace <code>default</code></h4> |
| 83 | + <div #container2 id="container2" class="scrollContainer"> |
78 | 84 |
|
79 | | - <p id="container2Head"> |
80 | | - This containers scroll animation is started at the same time like the first one. |
81 | | - Both are in the same namespace, but this one's is started second and thus actually takes place. |
82 | | - </p> |
| 85 | + <p id="container2Head"> |
| 86 | + This containers scroll animation is started at the same time like the first one. |
| 87 | + Both are in the same namespace, but this one's is started second and thus actually takes place. |
| 88 | + </p> |
83 | 89 |
|
84 | | - <app-dummy-content [length]="4"></app-dummy-content> |
| 90 | + <app-dummy-content [length]="4"></app-dummy-content> |
85 | 91 |
|
86 | | - <p> |
87 | | - <button mat-raised-button color="warn" id="scrollTarget2">Target</button> |
88 | | - </p> |
| 92 | + <p> |
| 93 | + <button mat-raised-button color="warn" id="scrollTarget2">Target</button> |
| 94 | + </p> |
89 | 95 |
|
90 | | - <app-dummy-content [length]="4"></app-dummy-content> |
| 96 | + <app-dummy-content [length]="4"></app-dummy-content> |
91 | 97 |
|
| 98 | + </div> |
92 | 99 | </div> |
93 | | - </div> |
94 | 100 |
|
95 | | - <div> |
96 | | - <h4>Namespace <code>customSpace</code></h4> |
97 | | - <div #container3 id="container3" class="scrollContainer"> |
| 101 | + <div> |
| 102 | + <h4>Namespace <code>customSpace</code></h4> |
| 103 | + <div #container3 id="container3" class="scrollContainer"> |
98 | 104 |
|
99 | | - <p id="container3Head"> |
100 | | - This containers scroll animation uses a custom namespace <code>customSpace</code>. |
101 | | - It is therefore capable to scroll independently of the status of the <code>default</code> namespace |
102 | | - animations. |
103 | | - </p> |
| 105 | + <p id="container3Head"> |
| 106 | + This containers scroll animation uses a custom namespace <code>customSpace</code>. |
| 107 | + It is therefore capable to scroll independently of the status of the <code>default</code> namespace |
| 108 | + animations. |
| 109 | + </p> |
104 | 110 |
|
105 | | - <app-dummy-content [length]="4"></app-dummy-content> |
| 111 | + <app-dummy-content [length]="4"></app-dummy-content> |
106 | 112 |
|
107 | | - <p> |
108 | | - <button mat-raised-button color="warn" id="scrollTarget3">Target</button> |
109 | | - </p> |
| 113 | + <p> |
| 114 | + <button mat-raised-button color="warn" id="scrollTarget3">Target</button> |
| 115 | + </p> |
110 | 116 |
|
111 | | - <app-dummy-content [length]="4"></app-dummy-content> |
| 117 | + <app-dummy-content [length]="4"></app-dummy-content> |
112 | 118 |
|
| 119 | + </div> |
113 | 120 | </div> |
114 | | - </div> |
| 121 | + </mat-card-content> |
115 | 122 | </mat-card> |
0 commit comments