From 7cafe2ee4e0445bb6bf9e44fc7a1039a8fe0fa19 Mon Sep 17 00:00:00 2001 From: Ilya Bogdanov Date: Tue, 27 Feb 2024 18:46:02 +0400 Subject: [PATCH] More cleanups --- app/gui2/src/bindings.ts | 2 +- app/gui2/src/components/GraphEditor.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/gui2/src/bindings.ts b/app/gui2/src/bindings.ts index ff7c3487ae5b..4926981c114a 100644 --- a/app/gui2/src/bindings.ts +++ b/app/gui2/src/bindings.ts @@ -1,7 +1,7 @@ import { defineKeybinds } from '@/util/shortcuts' export const codeEditorBindings = defineKeybinds('code-editor', { - toggle: ['`'], + toggle: ['Mod+`'], }) export const interactionBindings = defineKeybinds('current-interaction', { diff --git a/app/gui2/src/components/GraphEditor.vue b/app/gui2/src/components/GraphEditor.vue index 18712f90c3b7..0f263f71fc54 100644 --- a/app/gui2/src/components/GraphEditor.vue +++ b/app/gui2/src/components/GraphEditor.vue @@ -231,7 +231,6 @@ const graphBindingsHandler = graphBindings.handler({ nodeSelection.selectAll() }, deselectAll() { - console.log('deselect all', document.activeElement) nodeSelection.deselectAll() if (document.activeElement instanceof HTMLElement) { document.activeElement.blur() @@ -250,6 +249,7 @@ const graphBindingsHandler = graphBindings.handler({ }) }, toggleVisualizationFullscreen() { + if (nodeSelection.selected.size !== 1) return graphStore.transact(() => { const selected = set.first(nodeSelection.selected) const isFullscreen = graphStore.db.nodeIdToNode.get(selected)?.vis?.fullscreen @@ -325,10 +325,10 @@ const graphBindingsHandler = graphBindings.handler({ const { handleClick } = useDoubleClick( (e: MouseEvent) => { + graphBindingsHandler(e) if (document.activeElement instanceof HTMLElement) { document.activeElement.blur() } - graphBindingsHandler(e) }, () => { if (keyboardBusy()) return false