cleanup: Use spread properties instead of Object.assign()

It's more concise and has been around long enough to embrace it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3196>
This commit is contained in:
Florian Müllner
2020-03-25 01:00:56 +01:00
parent 5ce991749d
commit 8eec7ac3f4
7 changed files with 30 additions and 24 deletions

View File

@ -211,13 +211,14 @@ function _easeActorProperty(actor, propName, target, params) {
}
let pspec = actor.find_property(propName);
let transition = new Clutter.PropertyTransition(Object.assign({
let transition = new Clutter.PropertyTransition({
property_name: propName,
interval: new Clutter.Interval({value_type: pspec.value_type}),
remove_on_complete: true,
repeat_count: repeatCount,
auto_reverse: autoReverse,
}, params));
...params,
});
actor.add_transition(propName, transition);
transition.set_to(target);