fix: make springs and maps update descendants as root update

This commit is contained in:
ernisto 2025-03-16 17:58:28 -03:00
parent 1721c19da9
commit d8149f0648
2 changed files with 3 additions and 3 deletions

View file

@ -86,7 +86,7 @@ local function indexes<K, VI, VO>(input: () -> Map<K, VI>, transform: (() -> VI,
output_cache[i] = result output_cache[i] = result
else -- update source else -- update source
input_nodes[i].cache = v input_nodes[i].cache = v
update_descendants(input_nodes[i]) update_descendants(input_nodes[i], true)
end end
end end
end end
@ -170,7 +170,7 @@ local function values<K, VI, VO>(input: () -> Map<K, VI>, transform: (VI, () ->
else -- update source else -- update source
if cv ~= i then if cv ~= i then
input_nodes[v].cache = i input_nodes[v].cache = i
update_descendants(input_nodes[v]) update_descendants(input_nodes[v], true)
end end
cur_input_cache[v] = nil cur_input_cache[v] = nil

View file

@ -285,7 +285,7 @@ local function update_spring_sources()
output.cache = vec6_to_type[typeof(data.source_value)](x0_123, x0_456) output.cache = vec6_to_type[typeof(data.source_value)](x0_123, x0_456)
end end
update_descendants(output) update_descendants(output, true)
end end
end end