|
|
|
|
@ -93,15 +93,13 @@ export function runAppCompiled(canvas: HTMLCanvasElement, store: any) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const viewResult = instance.view(instance.state);
|
|
|
|
|
let viewUI = viewResult;
|
|
|
|
|
|
|
|
|
|
if (ui.focusable) {
|
|
|
|
|
viewUI = {
|
|
|
|
|
const viewUI = {
|
|
|
|
|
kind: 'clickable',
|
|
|
|
|
child: viewUI,
|
|
|
|
|
onClick: (coords: any) => ({ _tag: 'FocusAndClick', _0: fullKey, _1: coords })
|
|
|
|
|
child: viewResult,
|
|
|
|
|
onClick: ui.focusable
|
|
|
|
|
? (coords: any) => ({ _tag: 'FocusAndClick', _0: fullKey, _1: coords })
|
|
|
|
|
: (coords: any) => ({ _tag: 'ClickOnly', _0: fullKey, _1: coords })
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
return expandStateful(viewUI, [...path, ui.key], renderedKeys);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -191,6 +189,13 @@ export function runAppCompiled(canvas: HTMLCanvasElement, store: any) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (event._tag === 'ClickOnly') {
|
|
|
|
|
const componentKey = event._0;
|
|
|
|
|
const coords = event._1;
|
|
|
|
|
handleComponentEvent(componentKey, { _tag: 'Clicked', _0: coords });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (event._tag === 'Rebind') {
|
|
|
|
|
store.rebind(event._0, event._1, event._2);
|
|
|
|
|
return;
|
|
|
|
|
|