environment: Apply autoReverse/repeatCount to all transitions
Like the old Tweener API, ease() allows to transition multiple
properties at once. If autoReverse or repeatCount are specified,
they should apply to all transitions, but right now we only set
them for the first one.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2007>
(cherry picked from commit cc5cc0d653
)
This commit is contained in:
parent
a2f6efa5e1
commit
fc680556f5
@ -201,21 +201,24 @@ function _easeActor(actor, params) {
|
||||
actor.set(params);
|
||||
actor.restore_easing_state();
|
||||
|
||||
let transition = animatedProps.map(p => actor.get_transition(p))
|
||||
.find(t => t !== null);
|
||||
const transitions = animatedProps
|
||||
.map(p => actor.get_transition(p))
|
||||
.filter(t => t !== null);
|
||||
|
||||
transitions.forEach(t => t.set({ repeatCount, autoReverse }));
|
||||
|
||||
const [transition] = transitions;
|
||||
|
||||
if (transition && transition.delay)
|
||||
transition.connect('started', () => prepare());
|
||||
else
|
||||
prepare();
|
||||
|
||||
if (transition) {
|
||||
transition.set({ repeatCount, autoReverse });
|
||||
if (transition)
|
||||
transition.connect('stopped', (t, finished) => callback(finished));
|
||||
} else {
|
||||
else
|
||||
callback(true);
|
||||
}
|
||||
}
|
||||
|
||||
function _easeActorProperty(actor, propName, target, params) {
|
||||
// Avoid pointless difference with ease()
|
||||
|
Loading…
Reference in New Issue
Block a user