동서남북 적용
This commit is contained in:
parent
22ca59e9b9
commit
f04f7570cc
@ -1662,11 +1662,11 @@ export const useTrestle = () => {
|
||||
break
|
||||
}
|
||||
case 'west': {
|
||||
startPointX += 5
|
||||
startPointX -= 5
|
||||
break
|
||||
}
|
||||
case 'north': {
|
||||
startPointY += 5
|
||||
startPointY -= 5
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -1686,14 +1686,15 @@ export const useTrestle = () => {
|
||||
})
|
||||
canvas.add(bracket)
|
||||
canvas.renderAll()
|
||||
const maxIntvl = Math.max(moduleIntvlHor, moduleIntvlVer)
|
||||
if (direction === 'south') {
|
||||
startPointY -= height + moduleIntvlVer / 10
|
||||
startPointY -= height + maxIntvl / 10
|
||||
} else if (direction === 'north') {
|
||||
startPointY += height + moduleIntvlVer / 10
|
||||
startPointY += height + maxIntvl / 10
|
||||
} else if (direction === 'east') {
|
||||
startPointX -= width - moduleIntvlHor / 10
|
||||
startPointX -= width + maxIntvl / 10
|
||||
} else if (direction === 'west') {
|
||||
startPointX += width + moduleIntvlHor / 10
|
||||
startPointX += width + maxIntvl / 10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user