diff --git a/src/components/house-planner/HousePlanner.vue b/src/components/house-planner/HousePlanner.vue index 55e2383..075c070 100644 --- a/src/components/house-planner/HousePlanner.vue +++ b/src/components/house-planner/HousePlanner.vue @@ -59,10 +59,8 @@ import { HomeIcon, ArrowsPointingOutIcon, ArrowDownOnSquareIcon, - Square3Stack3DIcon, } from '@heroicons/vue/24/outline'; import { useSessionStorage } from '@vueuse/core'; -import type { Component } from 'vue'; import { onMounted, ref, shallowRef } from 'vue'; import { HousePlanner } from '../../modules/house-planner'; import { @@ -71,12 +69,10 @@ import { ToolEvent, Vec2, } from '../../modules/house-planner/interfaces'; -import { LayerObjectType } from '../../modules/house-planner/types'; import deepUnref from '../../utils/deep-unref'; import { ToolbarTool } from './interfaces/toolbar.interfaces'; import PlannerLayerPanel from './PlannerLayerPanel.vue'; import PlannerPropertyPanel from './PlannerPropertyPanel.vue'; -import PlannerSidebar from './PlannerSidebar.vue'; import PlannerSidebars from './PlannerSidebars.vue'; import PlannerTool from './PlannerTool.vue'; import PlannerToolbar from './PlannerToolbar.vue'; @@ -149,7 +145,7 @@ const selectTool = (newTool?: string, newSubTool?: string) => { if (newTool === tool.value && !newSubTool) { newTool = undefined; } - module.value.manager?.tools.setTool(newTool, newSubTool); + module.value.manager?.tools?.setTool(newTool, newSubTool); }; const commitObjectName = (layerId: number, objectId: number, name: string) => { @@ -163,13 +159,13 @@ const commitLayerName = (layerId: number, name: string) => { const clickedOnObject = (layerId: number, objectId: number, add?: boolean) => { const object = module.value.manager?.getLayerObjectById(layerId, objectId); if (!object) return; - module.value.manager?.tools.selectObject(object, add); + module.value.manager?.tools?.selectObject(object, add); }; const clickedOnLayer = (layerId: number) => { const layer = module.value.manager?.getLayerById(layerId); if (!layer) return; - module.value.manager?.tools.selectLayer(layer); + module.value.manager?.tools?.selectLayer(layer); }; const updateObjectProperty = ( @@ -188,7 +184,7 @@ onMounted(() => { canvas.value, deepUnref(serializedLayers.value), [1920, 1080], - canvasPos, + canvasPos.value, canvasZoom.value ); @@ -204,7 +200,7 @@ onMounted(() => { subTool.value = e.detail.secondary as string; }, 'hpc:position': (e: CustomEvent) => { - //canvasPos.value = e.detail.position; + canvasPos.value = e.detail.position; canvasZoom.value = e.detail.zoom; }, }; diff --git a/src/components/house-planner/PlannerLayerPanel.vue b/src/components/house-planner/PlannerLayerPanel.vue index d00c4b3..f47d176 100644 --- a/src/components/house-planner/PlannerLayerPanel.vue +++ b/src/components/house-planner/PlannerLayerPanel.vue @@ -3,21 +3,14 @@