diff --git a/src/pages/movement-supervision.vue b/src/pages/movement-supervision.vue index afaec1a..70a0679 100644 --- a/src/pages/movement-supervision.vue +++ b/src/pages/movement-supervision.vue @@ -138,7 +138,7 @@ onMounted(async () => { await readScene(); await editor.value?.initRobots(); await monitorScene(); - await storageLocationService.value?.startMonitoring({ interval: 3 }); + storageLocationService.value?.startMonitoring({ interval: 3 }); // 自动保存和恢复视图状态 await handleAutoSaveAndRestoreViewState(); }); diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index 03b64c3..6046499 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -643,16 +643,17 @@ export class EditorService extends Meta2d { if (existingIcon) { this.setValue({ id: lockIconId, visible: true }, { render: true, history: false, doEvent: false }); } else { - const { x = 0, y = 0, width = 0 } = this.getPenRect(pointPen); + const { x = 0, y = 0 } = this.getPenRect(pointPen); const iconPen: MapPen = { id: lockIconId, - name: 'image', + name: 'circle', tags: ['lock-icon'], - x: x - width / 2 - 20, // 在点左侧显示 - y: y - 10, - width: 16, - height: 16, - image: '/icons/lock.svg', + x: x - 14, // 在点右侧显示 + y: y + 16, + width: 8, + height: 8, + background: '#ff4d4f', // 红色背景 + color: '#ff4d4f', locked: LockState.Disable, visible: true, };