citadel #1
@ -201,20 +201,23 @@ function _easeActor(actor, params) {
|
|||||||
actor.set(params);
|
actor.set(params);
|
||||||
actor.restore_easing_state();
|
actor.restore_easing_state();
|
||||||
|
|
||||||
let transition = animatedProps.map(p => actor.get_transition(p))
|
const transitions = animatedProps
|
||||||
.find(t => t !== null);
|
.map(p => actor.get_transition(p))
|
||||||
|
.filter(t => t !== null);
|
||||||
|
|
||||||
|
transitions.forEach(t => t.set({ repeatCount, autoReverse }));
|
||||||
|
|
||||||
|
const [transition] = transitions;
|
||||||
|
|
||||||
if (transition && transition.delay)
|
if (transition && transition.delay)
|
||||||
transition.connect('started', () => prepare());
|
transition.connect('started', () => prepare());
|
||||||
else
|
else
|
||||||
prepare();
|
prepare();
|
||||||
|
|
||||||
if (transition) {
|
if (transition)
|
||||||
transition.set({ repeatCount, autoReverse });
|
|
||||||
transition.connect('stopped', (t, finished) => callback(finished));
|
transition.connect('stopped', (t, finished) => callback(finished));
|
||||||
} else {
|
else
|
||||||
callback(true);
|
callback(true);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function _easeActorProperty(actor, propName, target, params) {
|
function _easeActorProperty(actor, propName, target, params) {
|
||||||
|
Loading…
Reference in New Issue
Block a user