Színkorrekciók

This commit is contained in:
2025-08-23 00:05:18 +02:00
parent 34a6df5949
commit a1ff3beb35
471 changed files with 63615 additions and 6 deletions
+24
View File
@@ -0,0 +1,24 @@
const notify = (node) => !node.isLayoutDirty && node.willUpdate(false);
function nodeGroup() {
const nodes = new Set();
const subscriptions = new WeakMap();
const dirtyAll = () => nodes.forEach(notify);
return {
add: (node) => {
nodes.add(node);
subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll));
},
remove: (node) => {
nodes.delete(node);
const unsubscribe = subscriptions.get(node);
if (unsubscribe) {
unsubscribe();
subscriptions.delete(node);
}
dirtyAll();
},
dirty: dirtyAll,
};
}
export { nodeGroup };