From 122a178feb60917b8b53f132efa4d02272ccac03 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Thu, 6 Feb 2025 14:50:30 +0100 Subject: [PATCH] Minor change --- .../gameMaster/mapEditor/partials/TileList.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/gameMaster/mapEditor/partials/TileList.vue b/src/components/gameMaster/mapEditor/partials/TileList.vue index dba38ec..c1a9e6d 100644 --- a/src/components/gameMaster/mapEditor/partials/TileList.vue +++ b/src/components/gameMaster/mapEditor/partials/TileList.vue @@ -65,6 +65,9 @@ import { TileStorage } from '@/storage/storages' import { computed, onMounted, onUnmounted, ref } from 'vue' const isOpen = ref(false) +const width = ref(320) +const isDragging = ref(false) + const tileStorage = new TileStorage() const mapEditor = useMapEditorComposable() const tileProcessor = useTileProcessingComposable() @@ -73,8 +76,7 @@ const selectedTags = ref([]) const tileCategories = ref>(new Map()) const selectedGroup = ref<{ parent: Tile; children: Tile[] } | null>(null) const tiles = ref([]) -const width = ref(320) -const isDragging = ref(false) + function startDragging(event: MouseEvent) { isDragging.value = true @@ -84,8 +86,7 @@ function startDragging(event: MouseEvent) { function onMouseMove(e: MouseEvent) { if (isDragging.value) { const deltaX = startX - e.clientX - const newWidth = Math.max(320, Math.min(800, startWidth + deltaX)) - width.value = newWidth + width.value = Math.max(320, Math.min(800, startWidth + deltaX)) } }