동서남북 적용

This commit is contained in:
hyojun.choi 2025-03-13 13:53:21 +09:00
parent 22ca59e9b9
commit f04f7570cc

View File

@ -1662,11 +1662,11 @@ export const useTrestle = () => {
break break
} }
case 'west': { case 'west': {
startPointX += 5 startPointX -= 5
break break
} }
case 'north': { case 'north': {
startPointY += 5 startPointY -= 5
break break
} }
} }
@ -1686,14 +1686,15 @@ export const useTrestle = () => {
}) })
canvas.add(bracket) canvas.add(bracket)
canvas.renderAll() canvas.renderAll()
const maxIntvl = Math.max(moduleIntvlHor, moduleIntvlVer)
if (direction === 'south') { if (direction === 'south') {
startPointY -= height + moduleIntvlVer / 10 startPointY -= height + maxIntvl / 10
} else if (direction === 'north') { } else if (direction === 'north') {
startPointY += height + moduleIntvlVer / 10 startPointY += height + maxIntvl / 10
} else if (direction === 'east') { } else if (direction === 'east') {
startPointX -= width - moduleIntvlHor / 10 startPointX -= width + maxIntvl / 10
} else if (direction === 'west') { } else if (direction === 'west') {
startPointX += width + moduleIntvlHor / 10 startPointX += width + maxIntvl / 10
} }
} }
} }