Skip to content

Commit 0f501b2

Browse files
committed
#274 HelixMainContainer: toggle controls panel logic
1 parent 615b0f8 commit 0f501b2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

examples/component/coronaHelix/HelixMainContainer.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ class HelixMainContainer extends Viewport {
6666
ntype: 'button',
6767
text : 'X',
6868
handler: function() {
69-
console.log('hide controls'); // todo
69+
const panel = this.up('panel'),
70+
expand = panel.width === 40;
71+
72+
panel.width = expand ? 250 : 40;
73+
this.text = expand ? 'X' : '+';
7074
}
7175
}, {
7276
ntype: 'label',

0 commit comments

Comments
 (0)