|
|
@ -31,8 +31,11 @@ export function add_flush_callback(fn) {
|
|
|
|
flush_callbacks.push(fn);
|
|
|
|
flush_callbacks.push(fn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let flushing = false;
|
|
|
|
const seen_callbacks = new Set();
|
|
|
|
const seen_callbacks = new Set();
|
|
|
|
export function flush() {
|
|
|
|
export function flush() {
|
|
|
|
|
|
|
|
if (flushing) return;
|
|
|
|
|
|
|
|
flushing = true;
|
|
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
do {
|
|
|
|
// first, call beforeUpdate functions
|
|
|
|
// first, call beforeUpdate functions
|
|
|
@ -69,6 +72,7 @@ export function flush() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
update_scheduled = false;
|
|
|
|
update_scheduled = false;
|
|
|
|
|
|
|
|
flushing = false;
|
|
|
|
seen_callbacks.clear();
|
|
|
|
seen_callbacks.clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|