keep focused class

This commit is contained in:
Bruno Windels 2020-10-07 17:59:58 +02:00
parent c80c369c42
commit b79b41adcd

View file

@ -26,7 +26,10 @@ export class RoomGridView extends TemplateView {
children.push(t.div({
onClick: () => vm.setFocusAt(x, y),
onFocusin: () => vm.setFocusAt(x, y),
className: "container",
className: {
"container": true,
"focused": vm => vm.isFocusAt(x, y)
},
style: `--column: ${x + 1}; --row: ${y + 1}`
},t.mapView(vm => vm.roomViewModelAt(x, y), roomVM => {
if (roomVM) {