From 6adcbef9ced6c3d30b1db158ff53baec4572653f Mon Sep 17 00:00:00 2001 From: Julian Lawrance Date: Fri, 26 Apr 2024 17:45:31 +0100 Subject: [PATCH] Allow click-and-drag to scroll knockout bracket in modal --- src/components/modals/BracketModal.vue | 13 ++++++++++++- src/composables/useCursorGrab.ts | 18 ++++++++++++++++++ src/main.ts | 2 ++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/composables/useCursorGrab.ts diff --git a/src/components/modals/BracketModal.vue b/src/components/modals/BracketModal.vue index f0f5e52..5ac36d7 100644 --- a/src/components/modals/BracketModal.vue +++ b/src/components/modals/BracketModal.vue @@ -3,11 +3,18 @@ import { useI18n } from "vue-i18n" import KnockoutBracket from "../play/KnockoutBracket.vue" +import { useCursorGrab } from "@/composables/useCursorGrab" + const { t } = useI18n() const visible = defineModel("visible", { default: false, }) + +const { + cursorStyle, + setGrabbing, +} = useCursorGrab()