Minor change
This commit is contained in:
parent
909dbf4280
commit
122a178feb
@ -65,6 +65,9 @@ import { TileStorage } from '@/storage/storages'
|
|||||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||||
|
|
||||||
const isOpen = ref(false)
|
const isOpen = ref(false)
|
||||||
|
const width = ref(320)
|
||||||
|
const isDragging = ref(false)
|
||||||
|
|
||||||
const tileStorage = new TileStorage()
|
const tileStorage = new TileStorage()
|
||||||
const mapEditor = useMapEditorComposable()
|
const mapEditor = useMapEditorComposable()
|
||||||
const tileProcessor = useTileProcessingComposable()
|
const tileProcessor = useTileProcessingComposable()
|
||||||
@ -73,8 +76,7 @@ const selectedTags = ref<string[]>([])
|
|||||||
const tileCategories = ref<Map<string, string>>(new Map())
|
const tileCategories = ref<Map<string, string>>(new Map())
|
||||||
const selectedGroup = ref<{ parent: Tile; children: Tile[] } | null>(null)
|
const selectedGroup = ref<{ parent: Tile; children: Tile[] } | null>(null)
|
||||||
const tiles = ref<Tile[]>([])
|
const tiles = ref<Tile[]>([])
|
||||||
const width = ref(320)
|
|
||||||
const isDragging = ref(false)
|
|
||||||
|
|
||||||
function startDragging(event: MouseEvent) {
|
function startDragging(event: MouseEvent) {
|
||||||
isDragging.value = true
|
isDragging.value = true
|
||||||
@ -84,8 +86,7 @@ function startDragging(event: MouseEvent) {
|
|||||||
function onMouseMove(e: MouseEvent) {
|
function onMouseMove(e: MouseEvent) {
|
||||||
if (isDragging.value) {
|
if (isDragging.value) {
|
||||||
const deltaX = startX - e.clientX
|
const deltaX = startX - e.clientX
|
||||||
const newWidth = Math.max(320, Math.min(800, startWidth + deltaX))
|
width.value = Math.max(320, Math.min(800, startWidth + deltaX))
|
||||||
width.value = newWidth
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user