지지금구 설치 위치 조정

This commit is contained in:
hyojun.choi 2025-02-10 17:03:43 +09:00
parent f0e13bd233
commit 66b95b565c

View File

@ -1171,7 +1171,7 @@ export const useTrestle = () => {
seq,
smartRackId,
rackId: itemId,
direction: 'right',
direction: 'bottom',
})
canvas.add(rack)
canvas.renderAll()
@ -1231,16 +1231,17 @@ export const useTrestle = () => {
canvas.renderAll()
racks.forEach((rack) => {
const { x1, y1, x2, y2, direction, supFitQty, supFitIntvlPct, rackLen, name } = rack
let { x1, y1, x2, y2, direction, supFitQty, supFitIntvlPct, rackLen, name } = rack
const bracketLength = 10
if (direction === 'top') {
const result = getBracketPoints(supFitQty, supFitIntvlPct)
result.forEach((percent) => {
const len = name === 'smartRack' ? y2 - (y2 - y1) * percent - bracketLength / 2 : y2 - (y2 - y1) * percent - bracketLength / 2
const bracket = new fabric.Rect({
left: x2 - bracketLength / 3,
top: name === 'smartRack' ? y2 + rackLen * percent : y2 + (rackLen / 10) * percent,
top: len,
fill: 'green',
name: 'bracket',
parentId: rack.parentId,
@ -1258,8 +1259,10 @@ export const useTrestle = () => {
const result = getBracketPoints(supFitQty, supFitIntvlPct)
result.forEach((percent) => {
const len =
name === 'smartRack' ? x1 - Math.abs(x2 - x1) * percent - bracketLength / 2 : x1 - Math.abs(x2 - x1) * percent - bracketLength / 2
const bracket = new fabric.Rect({
left: name === 'smartRack' ? x2 + rackLen * percent : x2 + (rackLen / 10) * percent,
left: len,
top: y2 - bracketLength / 3,
fill: 'green',
name: 'bracket',
@ -1278,8 +1281,10 @@ export const useTrestle = () => {
const result = getBracketPoints(supFitQty, supFitIntvlPct)
result.forEach((percent) => {
const len =
name === 'smartRack' ? x2 - Math.abs(x2 - x1) * percent - bracketLength / 2 : x2 - Math.abs(x2 - x1) * percent - bracketLength / 2
const bracket = new fabric.Rect({
left: name === 'smartRack' ? x2 - rackLen * percent : x2 - (rackLen / 10) * percent,
left: len,
top: y2 - bracketLength / 3,
fill: 'green',
parentId: rack.parentId,
@ -1298,9 +1303,10 @@ export const useTrestle = () => {
const result = getBracketPoints(supFitQty, supFitIntvlPct)
result.forEach((percent) => {
const len = name === 'smartRack' ? y2 - (y2 - y1) * percent - bracketLength / 2 : y2 - (y2 - y1) * percent - bracketLength / 2
const bracket = new fabric.Rect({
left: x2 - bracketLength / 3,
top: name === 'smartRack' ? y2 - rackLen * percent : y2 - (rackLen / 10) * percent,
top: len,
fill: 'green',
name: 'bracket',
parentId: rack.parentId,