From 1c2a8a37ffab160cdfc4aca6cb7513f41000ed5a Mon Sep 17 00:00:00 2001 From: xqyjlj Date: Sun, 14 Dec 2025 00:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=97=B6=E9=92=9F=E6=A0=91node=E8=8A=82=E7=82=B9position?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xqyjlj --- electron/types/clockTree.d.ts | 2 +- src/database/clockTree.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/electron/types/clockTree.d.ts b/electron/types/clockTree.d.ts index ea39b815..3c55afe0 100644 --- a/electron/types/clockTree.d.ts +++ b/electron/types/clockTree.d.ts @@ -44,7 +44,7 @@ export interface ClockTreeEdgeType { export interface ClockTreeNodeType { type: ClockTreeNodeTypeType - position: XYPosition + position?: XYPosition unit?: ClockTreeNodeUnitType } diff --git a/src/database/clockTree.ts b/src/database/clockTree.ts index 633d8344..0662f3d2 100644 --- a/src/database/clockTree.ts +++ b/src/database/clockTree.ts @@ -155,7 +155,7 @@ export class ClockTreeNode { } get position(): XYPosition { - return this._origin.position + return this._origin.position ?? { x: 0, y: 0 } } get unit(): ClockTreeNodeUnitType | undefined {