environment: Make more explicit what are the default values
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2986>
This commit is contained in:
parent
a2c789ddb7
commit
91ae7de3ad
@ -90,6 +90,12 @@ function _getPropertyTarget(actor, propName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _easeActor(actor, params) {
|
function _easeActor(actor, params) {
|
||||||
|
params = {
|
||||||
|
repeatCount: 0,
|
||||||
|
autoReverse: false,
|
||||||
|
...params,
|
||||||
|
};
|
||||||
|
|
||||||
actor.save_easing_state();
|
actor.save_easing_state();
|
||||||
|
|
||||||
if (params.duration !== undefined)
|
if (params.duration !== undefined)
|
||||||
@ -100,14 +106,10 @@ function _easeActor(actor, params) {
|
|||||||
actor.set_easing_delay(params.delay);
|
actor.set_easing_delay(params.delay);
|
||||||
delete params.delay;
|
delete params.delay;
|
||||||
|
|
||||||
let repeatCount = 0;
|
const repeatCount = params.repeatCount;
|
||||||
if (params.repeatCount !== undefined)
|
|
||||||
repeatCount = params.repeatCount;
|
|
||||||
delete params.repeatCount;
|
delete params.repeatCount;
|
||||||
|
|
||||||
let autoReverse = false;
|
const autoReverse = params.autoReverse;
|
||||||
if (params.autoReverse !== undefined)
|
|
||||||
autoReverse = params.autoReverse;
|
|
||||||
delete params.autoReverse;
|
delete params.autoReverse;
|
||||||
|
|
||||||
// repeatCount doesn't include the initial iteration
|
// repeatCount doesn't include the initial iteration
|
||||||
@ -157,6 +159,12 @@ function _easeActor(actor, params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _easeActorProperty(actor, propName, target, params) {
|
function _easeActorProperty(actor, propName, target, params) {
|
||||||
|
params = {
|
||||||
|
repeatCount: 0,
|
||||||
|
autoReverse: false,
|
||||||
|
...params,
|
||||||
|
};
|
||||||
|
|
||||||
// Avoid pointless difference with ease()
|
// Avoid pointless difference with ease()
|
||||||
if (params.mode)
|
if (params.mode)
|
||||||
params.progress_mode = params.mode;
|
params.progress_mode = params.mode;
|
||||||
@ -166,14 +174,10 @@ function _easeActorProperty(actor, propName, target, params) {
|
|||||||
params.duration = adjustAnimationTime(params.duration);
|
params.duration = adjustAnimationTime(params.duration);
|
||||||
let duration = Math.floor(params.duration || 0);
|
let duration = Math.floor(params.duration || 0);
|
||||||
|
|
||||||
let repeatCount = 0;
|
const repeatCount = params.repeatCount;
|
||||||
if (params.repeatCount !== undefined)
|
|
||||||
repeatCount = params.repeatCount;
|
|
||||||
delete params.repeatCount;
|
delete params.repeatCount;
|
||||||
|
|
||||||
let autoReverse = false;
|
const autoReverse = params.autoReverse;
|
||||||
if (params.autoReverse !== undefined)
|
|
||||||
autoReverse = params.autoReverse;
|
|
||||||
delete params.autoReverse;
|
delete params.autoReverse;
|
||||||
|
|
||||||
// repeatCount doesn't include the initial iteration
|
// repeatCount doesn't include the initial iteration
|
||||||
|
Loading…
x
Reference in New Issue
Block a user