dev #218

Merged
ysCha merged 3 commits from dev into dev-deploy 2025-07-21 09:12:53 +09:00
Showing only changes of commit eb255d5148 - Show all commits

View File

@ -126,20 +126,17 @@ export default function CircuitTrestleSetting({ id }) {
// setCanvasZoom(100)
const arrows = canvas.getObjects().filter((obj) => obj.name === 'arrow')
let x,y
let x, y
x = canvas.width / 2
y = canvas.height / 2
// 0,0 50%
if(arrows.every((arrow) => arrow.left > 0) && arrows.every((arrow) => arrow.top > 0)) {
if (arrows.some((arrow) => arrow.left < 0) || arrows.some((arrow) => arrow.top < 0)) {
x = 0
y = 0
}
canvas.zoomToPoint(new fabric.Point(x, y), 0.5)
changeFontSize('lengthText', '28')
changeFontSize('circuitNumber', '28')