style(code): format

This commit is contained in:
zhangheng
2026-04-20 09:45:21 +08:00
parent cad763d2a3
commit 012257bb60
4 changed files with 25 additions and 21 deletions

View File

@@ -499,9 +499,7 @@ const PaperContainer = (
showTags,
showTagsConfigs,
} = useTopToolsStore()
const showShortcutGuide = useKeyboardStore(
(state) => state.showShortcutGuide
)
const showShortcutGuide = useKeyboardStore((state) => state.showShortcutGuide)
const shortcutGuidePosition = useKeyboardStore(
(state) => state.shortcutGuidePosition
)
@@ -4311,13 +4309,21 @@ const PaperContainer = (
border:
"1px solid light-dark(rgba(34,139,230,0.12), rgba(114,192,252,0.14))",
}}>
<Group justify="space-between" align="flex-start" gap="xs" wrap="nowrap">
<Group
justify="space-between"
align="flex-start"
gap="xs"
wrap="nowrap">
<Box>
<Text fw={700} size="sm">
</Text>
<Text size="10px" c="dimmed" style={{ lineHeight: 1.35 }}>
<Text component="span" fw={700}>?</Text>
{" "}
<Text component="span" fw={700}>
?
</Text>{" "}
</Text>
</Box>
<Text

View File

@@ -64,12 +64,10 @@ export const useKeyboardStore = create<KeyboardStore>()(
[sectionId]: !state.shortcutGuideCollapsedSections[sectionId],
},
})),
setDrawAction: (mode) =>
set((state) => ({ ...state, drawAction: mode })),
setDrawAction: (mode) => set((state) => ({ ...state, drawAction: mode })),
setSelectedObjectEditTarget: (target) =>
set((state) => ({ ...state, selectedObjectEditTarget: target })),
setCopyDataIds: (ids) =>
set((state) => ({ ...state, copyDataIds: ids })),
setCopyDataIds: (ids) => set((state) => ({ ...state, copyDataIds: ids })),
}),
{
name: "keyboard-store",

View File

@@ -902,9 +902,7 @@ const isPaperObjectType = (type: unknown) =>
typeof type === "string" &&
PAPER_OBJECT_TYPES.includes(type as (typeof PAPER_OBJECT_TYPES)[number])
const syncPaperObjectStrokeScaling = (
item: paper.Item | null | undefined
) => {
const syncPaperObjectStrokeScaling = (item: paper.Item | null | undefined) => {
if (!(item instanceof paper.Path || item instanceof paper.CompoundPath)) {
return
}
@@ -947,9 +945,13 @@ export const ensureEditablePaperPathSelected = (objectId: number) => {
if (!objectPaths.length) return null
const editablePaths = objectPaths.filter((item) => !item.data?.isHollowPolygon)
const editablePaths = objectPaths.filter(
(item) => !item.data?.isHollowPolygon
)
const activePath =
editablePaths.find((item) => item.data?.selected) || editablePaths[0] || null
editablePaths.find((item) => item.data?.selected) ||
editablePaths[0] ||
null
objectPaths.forEach((item) => {
item.data.selected = item === activePath
@@ -6721,12 +6723,7 @@ export const usePaperStore = create<PaperState>((set) => ({
}
return circle
},
getBuffPath: (
item: paper.Segment,
index: number,
id: number,
color: any
) => {
getBuffPath: (item: paper.Segment, index: number, id: number, color: any) => {
if (!item.next) return null
const hitStrokeColor = clonePaperColor(color) || new paper.Color("#fff")
hitStrokeColor.alpha = 0.001

View File

@@ -1,7 +1,10 @@
import paper from "paper"
import { useLabelStore, useObjectStore } from "../store"
import { useOtherToolsStore } from "../useOtherToolsStore"
import { ensureEditablePaperPathSelected, usePaperStore } from "../usePaperStore"
import {
ensureEditablePaperPathSelected,
usePaperStore,
} from "../usePaperStore"
import { usePaperSupportStore } from "../usePaperSupportStore"
import { useTopToolsStore } from "../useTopToolsStore"