Compare commits
No commits in common. "3192cb814ededa20a1ac838c8843efc8f0172ac5" and "6d1d492a0df9772f0af40458ed9345b8f7d99f16" have entirely different histories.
3192cb814e
...
6d1d492a0d
@ -19,7 +19,7 @@ export enum MapPointType {
|
|||||||
/** 库区点 - 仓储作业区域 */
|
/** 库区点 - 仓储作业区域 */
|
||||||
库区点,
|
库区点,
|
||||||
/** 密集库区点 - 密集库区点位 */
|
/** 密集库区点 - 密集库区点位 */
|
||||||
// 密集库区点,
|
密集库区点,
|
||||||
|
|
||||||
/** 电梯点 - 机器人乘坐电梯的专用点位 */
|
/** 电梯点 - 机器人乘坐电梯的专用点位 */
|
||||||
电梯点 = 11,
|
电梯点 = 11,
|
||||||
|
@ -198,11 +198,6 @@ export class EditorService extends Meta2d {
|
|||||||
|
|
||||||
#mapScenePoint(pen?: MapPen): StandardScenePoint | null {
|
#mapScenePoint(pen?: MapPen): StandardScenePoint | null {
|
||||||
if (!pen?.id || isEmpty(pen?.point)) return null;
|
if (!pen?.id || isEmpty(pen?.point)) return null;
|
||||||
|
|
||||||
// 过滤掉临时视图中心点
|
|
||||||
if (pen.id.includes('view-center-point')) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
const { id, label, desc, properties } = pen;
|
const { id, label, desc, properties } = pen;
|
||||||
const { type, extensionType, robots, actions, associatedStorageLocations, deviceId } = pen.point;
|
const { type, extensionType, robots, actions, associatedStorageLocations, deviceId } = pen.point;
|
||||||
const { x = 0, y = 0 } = this.getPointRect(pen) ?? {};
|
const { x = 0, y = 0 } = this.getPointRect(pen) ?? {};
|
||||||
|
@ -223,21 +223,13 @@ export function useViewState() {
|
|||||||
// 跳转到临时点
|
// 跳转到临时点
|
||||||
editor.gotoById(centerPointId);
|
editor.gotoById(centerPointId);
|
||||||
|
|
||||||
// 立即取消选择,避免右侧卡片显示临时点信息
|
// 延迟移除临时点
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
editor.inactive();
|
const tempPen = editor.getPenById(centerPointId);
|
||||||
}, 10); // 短暂延迟确保跳转完成
|
if (tempPen) {
|
||||||
|
editor.delete([tempPen]);
|
||||||
// 延迟清理临时点(保存时已自动过滤,这里只是为了清理画布显示)
|
|
||||||
setTimeout(() => {
|
|
||||||
const remainingPoints = editor
|
|
||||||
.find('point')
|
|
||||||
.filter((point) => point.id && point.id.includes('view-center-point'));
|
|
||||||
if (remainingPoints && remainingPoints.length > 0) {
|
|
||||||
editor.delete(remainingPoints);
|
|
||||||
console.log(`清理了 ${remainingPoints.length} 个临时点`);
|
|
||||||
}
|
}
|
||||||
}, 500); // 增加延迟确保跳转完成
|
}, 100);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('跳转到指定位置失败:', error);
|
console.error('跳转到指定位置失败:', error);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user