mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:47:36 +00:00
LibWeb: Keep track of associated AnimationEffects in Animatable
This commit is contained in:
parent
2ade834655
commit
5eea53f27a
4 changed files with 33 additions and 1 deletions
|
@ -61,4 +61,14 @@ Vector<JS::NonnullGCPtr<Animation>> Animatable::get_animations(Web::Animations::
|
|||
return {};
|
||||
}
|
||||
|
||||
void Animatable::associate_with_effect(JS::NonnullGCPtr<AnimationEffect> effect)
|
||||
{
|
||||
m_associated_effects.append(effect);
|
||||
}
|
||||
|
||||
void Animatable::disassociate_with_effect(JS::NonnullGCPtr<AnimationEffect> effect)
|
||||
{
|
||||
m_associated_effects.remove_first_matching([&](auto element) { return effect == element; });
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue