mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Use milliseconds for Clutter animation delay
This commit is contained in:
12
utils.js
12
utils.js
@@ -456,9 +456,13 @@ var animate = function(actor, options) {
|
||||
return Tweener.addTween(actor, options);
|
||||
}
|
||||
|
||||
//to support both Tweener and Clutter animations, we use Tweener
|
||||
//"time" property defined in seconds, as opposed to Clutter animations
|
||||
//"duration" which is defined in milliseconds
|
||||
//to support both Tweener and Clutter animations, we use Tweener "time"
|
||||
//and "delay" properties defined in seconds, as opposed to Clutter animations
|
||||
//"duration" and "delay" which are defined in milliseconds
|
||||
if (options.delay) {
|
||||
options.delay = options.delay * 1000;
|
||||
}
|
||||
|
||||
options.duration = options.time * 1000;
|
||||
delete options.time;
|
||||
|
||||
@@ -476,7 +480,7 @@ var animate = function(actor, options) {
|
||||
|
||||
let params = [options];
|
||||
|
||||
if (actor instanceof St.Adjustment) {
|
||||
if ('value' in options && actor instanceof St.Adjustment) {
|
||||
params.unshift(options.value);
|
||||
delete options.value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user