From 6f18bde05825884400de4b889bc0ba1eb061ff1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 23 Jul 2022 01:42:31 +0200 Subject: [PATCH] overlay onAction move to control. --- src/component/main.vue | 1 - src/component/overlay.vue | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/component/main.vue b/src/component/main.vue index d64131ad..72d4e297 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -35,7 +35,6 @@ :inactiveCursors="state.settings.inactive_cursors && session.profile.sends_inactive_cursor" @updateKeyboardModifiers="updateKeyboardModifiers($event)" @uploadDrop="uploadDrop($event)" - @onAction="control.emit('overlay.' + $event.action, $event.target)" /> diff --git a/src/component/overlay.vue b/src/component/overlay.vue index 91346417..c8cdf146 100644 --- a/src/component/overlay.vue +++ b/src/component/overlay.vue @@ -5,8 +5,8 @@ ref="textarea" class="neko-overlay" :style="{ cursor }" - @click.stop.prevent="$emit('onAction', { action: 'click', target: $event })" - @contextmenu.stop.prevent="$emit('onAction', { action: 'contextmenu', target: $event })" + @click.stop.prevent="control.emit('overlay.click', $event)" + @contextmenu.stop.prevent="control.emit('overlay.contextmenu', $event)" @input.stop.prevent="onInput" @wheel.stop.prevent="onWheel" @mousemove.stop.prevent="onMouseMove"