+
@@ -18,13 +18,11 @@
import { useZoneEditorStore } from '@/stores/zoneEditorStore'
import { ref, computed, watch } from 'vue'
-const emit = defineEmits(['update_depth', 'move', 'delete'])
+const emit = defineEmits(['update_depth', 'move', 'delete', 'rotate'])
const zoneEditorStore = useZoneEditorStore()
const objectDepth = ref(zoneEditorStore.objectDepth)
-const isObjectSelected = computed(() => !!zoneEditorStore.selectedZoneObject)
-
watch(
() => zoneEditorStore.selectedZoneObject,
(selectedZoneObject) => {
@@ -39,6 +37,10 @@ const handleDepthInput = () => {
}
}
+const handleRotate = () => {
+ emit('rotate', zoneEditorStore.selectedZoneObject?.id)
+}
+
const handleMove = () => {
emit('move')
}
diff --git a/src/components/zone/Objects.vue b/src/components/zone/Objects.vue
index 2095209..837127c 100644
--- a/src/components/zone/Objects.vue
+++ b/src/components/zone/Objects.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/types.ts b/src/types.ts
index b6acada..7e5657a 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -68,6 +68,7 @@ export type ZoneObject = {
objectId: string
object: Object
depth: number
+ isRotated: boolean
positionX: number
positionY: number
}