-
Notifications
You must be signed in to change notification settings - Fork 72
How to flash #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Unfortunately it's not possible to configure the number of flashes, but here is the animation if you want to copy and customize it to have more than 2 flashes: export const flash = animation(
animate(
'{{ timing }}s {{ delay }}s',
keyframes([
style({ opacity: 1 }),
style({ opacity: 0 }),
style({ opacity: 1 }),
style({ opacity: 0 }),
style({ opacity: 1 }),
])
),
{ params: { timing: DEFAULT_TIMING, delay: 0 } }
); About the trigger, you must define the action in the transition. For instance, with the following code, the animation wil be triggered when the animations: [
trigger('flash', [transition('stateA => stateB', useAnimation(flash))])
] |
Thank you very much
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Jiayi Hu <notifications@github.com>
Sent: Tuesday, September 25, 2018 9:39 pm
To: jiayihu/ng-animate
Cc: shan75; Author
Subject: Re: [jiayihu/ng-animate] How to flash (#16)
Unfortunately it's not possible to configure the number of flashes, but here is the animation if you want to copy and customize it to have more than 2 flashes:
export const flash = animation(
animate(
'{{ timing }}s {{ delay }}s',
keyframes([
style({ opacity: 1 }),
style({ opacity: 0 }),
style({ opacity: 1 }),
style({ opacity: 0 }),
style({ opacity: 1 }),
])
),
{ params: { timing: DEFAULT_TIMING, delay: 0 } }
);
About the trigger, you must define the action in the transition. For instance, with the following code, the animation wil be triggered when the flash property changes from stateA to stateB aka this.flash = 'stateB':
animations: [
trigger('flash', [transition('stateA => stateB', useAnimation(flash))])
]
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjiayihu%2Fng-animate%2Fissues%2F16%23issuecomment-424493528&data=02%7C01%7C%7C7213c1a0573a4672583a08d623270e42%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735047974141459&sdata=GfrzlFSyhkWlfmoUMlDV8tpMcz8ZQPqDhcRlOP8YOy0%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAc45pq8hKD6MpIZRdZPSNizoaxIBjMapks5uepSZgaJpZM4W47gc&data=02%7C01%7C%7C7213c1a0573a4672583a08d623270e42%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735047974141459&sdata=7mfcVbTmZGHB7yFylexAgT8qKCp04NGy7ZwjyN%2BvKmM%3D&reserved=0>.
|
Hi Thanks for the details. animations: [ |
Hi
This is not an issue, but I want to use the basic flash , but it flashes only two times. I want to flash n times. How to do that? Also I want to trigger the flash by some action. How to achieve it?
Can you please explain
Thanks
The text was updated successfully, but these errors were encountered: