Allow sections to toggle in 2-element stack

This commit is contained in:
Nick O'Leary 2018-12-18 10:56:54 +00:00
parent c0837ead0e
commit 64df557423
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 8 additions and 0 deletions

View File

@ -66,6 +66,14 @@ RED.stack = (function() {
}
}
entry.expand();
} else if (entries.length === 2) {
if (entries[0] === entry) {
entries[0].collapse();
entries[1].expand();
} else {
entries[1].collapse();
entries[0].expand();
}
}
} else {
entry.toggle();