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

@@ -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