mirror of
https://github.com/penpot/penpot.git
synced 2026-08-09 06:18:47 +00:00
🐛 Expand folded combos that gain changed elements
setData merges datum props by id on a live G6 instance, so omitting style.collapsed retained a previous true: with "fold unchanged" on, a change inside a folded combo pulsed but never expanded it. Write the boolean explicitly both ways. Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
This commit is contained in:
parent
b6d34a0a97
commit
661eeb7dfd
@ -703,7 +703,11 @@ Graph Console
|
||||
const combo = { id: comboIdFor(n.id), data: { label: n.label, table: n.table } };
|
||||
const p = parentOf[n.id];
|
||||
if (p && hasCombo[p]) combo.combo = comboIdFor(p);
|
||||
if (collapsedIds && collapsedIds.has(combo.id)) combo.style = { collapsed: true };
|
||||
// Explicit boolean both ways: setData merges datum props by id on a
|
||||
// live instance, so omitting `collapsed` would retain a previous
|
||||
// `true` — a change inside a folded combo could then never expand it
|
||||
// (the fold-unchanged bug).
|
||||
combo.style = { collapsed: !!(collapsedIds && collapsedIds.has(combo.id)) };
|
||||
combos.push(combo);
|
||||
});
|
||||
const g6nodes = nodes.map(function (n) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user