chore(playground): clang-format
This commit is contained in:

committed by
Alex Rickabaugh

parent
0d1f3c3b07
commit
6baf3baedd
@ -6,21 +6,11 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {
|
||||
Component,
|
||||
trigger,
|
||||
state,
|
||||
transition,
|
||||
keyframes,
|
||||
group,
|
||||
animate,
|
||||
style,
|
||||
sequence
|
||||
} from '@angular/core';
|
||||
import {Component, animate, group, keyframes, sequence, state, style, transition, trigger} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
host: {
|
||||
'[@backgroundAnimation]': "bgStatus"
|
||||
'[@backgroundAnimation]': 'bgStatus'
|
||||
},
|
||||
selector: 'animate-app',
|
||||
styleUrls: ['css/animate-app.css'],
|
||||
@ -39,31 +29,31 @@ import {
|
||||
</div>
|
||||
`,
|
||||
animations: [
|
||||
trigger("backgroundAnimation", [
|
||||
state("focus", style({ "background-color":"white" })),
|
||||
state("blur", style({ "background-color":"grey" })),
|
||||
transition("* => *", [
|
||||
trigger('backgroundAnimation', [
|
||||
state('focus', style({ 'background-color':'white' })),
|
||||
state('blur', style({ 'background-color':'grey' })),
|
||||
transition('* => *', [
|
||||
animate(500)
|
||||
])
|
||||
]),
|
||||
trigger("boxAnimation", [
|
||||
state("*", style({ "height": "*", "background-color": "#dddddd", "color":"black" })),
|
||||
state("void, hidden", style({ "height": 0, "opacity": 0 })),
|
||||
state("start", style({ "background-color": "red", "height": "*" })),
|
||||
state("active", style({ "background-color": "orange", "color": "white", "font-size":"100px" })),
|
||||
trigger('boxAnimation', [
|
||||
state('*', style({ 'height': '*', 'background-color': '#dddddd', 'color':'black' })),
|
||||
state('void, hidden', style({ 'height': 0, 'opacity': 0 })),
|
||||
state('start', style({ 'background-color': 'red', 'height': '*' })),
|
||||
state('active', style({ 'background-color': 'orange', 'color': 'white', 'font-size':'100px' })),
|
||||
|
||||
transition("active <=> start", [
|
||||
animate(500, style({ "transform": "scale(2)" })),
|
||||
transition('active <=> start', [
|
||||
animate(500, style({ 'transform': 'scale(2)' })),
|
||||
animate(500)
|
||||
]),
|
||||
|
||||
transition("* => *", [
|
||||
animate(1000, style({ "opacity": 1, "height": 300 })),
|
||||
animate(1000, style({ "background-color": "blue" })),
|
||||
transition('* => *', [
|
||||
animate(1000, style({ 'opacity': 1, 'height': 300 })),
|
||||
animate(1000, style({ 'background-color': 'blue' })),
|
||||
animate(1000, keyframes([
|
||||
style({ "background-color": "blue", "color": "black", "offset": 0.2 }),
|
||||
style({ "background-color": "brown", "color": "black", "offset": 0.5 }),
|
||||
style({ "background-color": "black", "color": "white", "offset": 1 })
|
||||
style({ 'background-color': 'blue', 'color': 'black', 'offset': 0.2 }),
|
||||
style({ 'background-color': 'brown', 'color': 'black', 'offset': 0.5 }),
|
||||
style({ 'background-color': 'black', 'color': 'white', 'offset': 1 })
|
||||
])),
|
||||
animate(2000)
|
||||
])
|
||||
@ -84,7 +74,7 @@ export class AnimateApp {
|
||||
}
|
||||
|
||||
reorderAndRemove() {
|
||||
this.items = this.items.sort((a: any,b: any) => Math.random() - 0.5);
|
||||
this.items = this.items.sort((a: any, b: any) => Math.random() - 0.5);
|
||||
this.items.splice(Math.floor(Math.random() * this.items.length), 1);
|
||||
this.items.splice(Math.floor(Math.random() * this.items.length), 1);
|
||||
this.items[Math.floor(Math.random() * this.items.length)] = 99;
|
||||
@ -96,12 +86,7 @@ export class AnimateApp {
|
||||
if (s == 'void') {
|
||||
this.items = [];
|
||||
} else {
|
||||
this.items = [
|
||||
1,2,3,4,5,
|
||||
6,7,8,9,10,
|
||||
11,12,13,14,15,
|
||||
16,17,18,19,20
|
||||
];
|
||||
this.items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,9 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AnimateApp} from './app/animate-app';
|
||||
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||
|
||||
import {AnimateApp} from './app/animate-app';
|
||||
|
||||
export function main() {
|
||||
bootstrap(AnimateApp);
|
||||
}
|
||||
|
Reference in New Issue
Block a user