feat(canvas): 自由画布 - 增强空白起点、外观设置与节点连接体验 (#356)
This commit is contained in:
1 parent
cc4aa736ff
commit
151e99f8d9
22 files changed
+925
-113
No files matched your search
@@ -0,0 +1,20 @@
|
||||
export type CanvasStarterMode = "guided" | "freeform";
|
||||
|
||||
export type CanvasEmptyStateKind = "none" | "guided" | "freeform" | "linked";
|
||||
|
||||
export function resolveCanvasEmptyStateKind({
|
||||
nodeCount,
|
||||
shortDramaEnabled,
|
||||
isProjectLinked,
|
||||
starterMode,
|
||||
}: {
|
||||
nodeCount: number;
|
||||
shortDramaEnabled: boolean;
|
||||
isProjectLinked: boolean;
|
||||
starterMode?: CanvasStarterMode;
|
||||
}): CanvasEmptyStateKind {
|
||||
if (nodeCount > 0) return "none";
|
||||
if (!shortDramaEnabled) return "freeform";
|
||||
if (isProjectLinked) return "linked";
|
||||
return starterMode === "freeform" ? "freeform" : "guided";
|
||||
}
|
||||
Reference in new issue
Block a user