Skip to content

Commit

Permalink
更新裁切线
Browse files Browse the repository at this point in the history
  • Loading branch information
more-strive committed Dec 1, 2023
1 parent 5836046 commit 7548e32
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/views/Canvas/useCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export default () => {
const { currentTemplate } = storeToRefs(templatesStore)
const { clip, safe, diagonal, opacity, showClip, showSafe } = storeToRefs(fabricStore)

const workWidth = currentTemplate.value.width / currentTemplate.value.zoom
const workHeight = currentTemplate.value.height / currentTemplate.value.zoom

// const workWidth = currentTemplate.value.width / currentTemplate.value.zoom
// const workHeight = currentTemplate.value.height / currentTemplate.value.zoom
const workWidth = workSpaceDraw.width, workHeight = workSpaceDraw.height
const Padding = 50000, PaddingHalf = Padding / 2
const clipPX = clip.value * DefaultDPI / DefaultRatio
const diagonalPX = diagonal.value * DefaultDPI / DefaultRatio
Expand All @@ -39,8 +39,8 @@ export default () => {
const workSpaceClip = new Rect({
left: left,
top: top,
width: workWidth,
height: workHeight,
width: workWidth - 2 * clipPX,
height: workHeight - 2 * clipPX,
fill: TransparentFill,
stroke: WorkSpaceClipColor, // 边框颜色
strokeWidth: 1, // 边框大小
Expand Down

0 comments on commit 7548e32

Please sign in to comment.