|
1 |
| -import { identity as linear, noop, run_all } from './utils.js'; |
| 1 | +import { identity as linear, noop, now, run_all } from './utils.js'; |
2 | 2 | import { loop } from './loop.js';
|
3 | 3 | import { create_rule, delete_rule } from './style_manager.js';
|
4 | 4 | import { custom_event } from './dom.js';
|
@@ -63,7 +63,7 @@ export function create_in_transition(node, fn, params) {
|
63 | 63 | if (css) animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);
|
64 | 64 | tick(0, 1);
|
65 | 65 |
|
66 |
| - const start_time = window.performance.now() + delay; |
| 66 | + const start_time = now() + delay; |
67 | 67 | const end_time = start_time + duration;
|
68 | 68 |
|
69 | 69 | if (task) task.abort();
|
@@ -136,7 +136,7 @@ export function create_out_transition(node, fn, params) {
|
136 | 136 |
|
137 | 137 | if (css) animation_name = create_rule(node, 1, 0, duration, delay, easing, css);
|
138 | 138 |
|
139 |
| - const start_time = window.performance.now() + delay; |
| 139 | + const start_time = now() + delay; |
140 | 140 | const end_time = start_time + duration;
|
141 | 141 |
|
142 | 142 | loop(now => {
|
@@ -224,7 +224,7 @@ export function create_bidirectional_transition(node, fn, params, intro) {
|
224 | 224 | } = config;
|
225 | 225 |
|
226 | 226 | const program = {
|
227 |
| - start: window.performance.now() + delay, |
| 227 | + start: now() + delay, |
228 | 228 | b
|
229 | 229 | };
|
230 | 230 |
|
|
0 commit comments