fix: 修复存储位置服务监控调用,优化锁定图标的显示属性和样式
This commit is contained in:
parent
8ab88e9818
commit
e3c0788e0b
@ -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();
|
||||
});
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user