| | |
| | | const newGlassIds = new Set(data.waitingGlass[0].map(rect => rect.glassId)); |
| | | const existingRects = adjustedRectsa.value.filter(rect => newGlassIds.has(rect.glassId)); |
| | | const newRects = data.waitingGlass[0].map(rect => { |
| | | const scaleFactor = 1390/5190; |
| | | const scaleFactor = 1390/6200; |
| | | const scaleFactorY = 750/2800; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta;; |
| | | let newX = rect.yCoordinate; |
| | |
| | | adjustedHeight = heighta * scaleFactorY; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5190 - (rect.yCoordinate + widtha); |
| | | newX = 6000 - (rect.yCoordinate + widtha); |
| | | } else { |
| | | adjustedWidth = heighta * scaleFactor; |
| | | adjustedHeight = widtha * scaleFactorY; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | newX = 5190 - (rect.yCoordinate + heighta); |
| | | newX = 6000 - (rect.yCoordinate + heighta); |
| | | } |
| | | return { |
| | | ...rect, |
| | |
| | | const existingRects = adjustedRectsb.value.filter(rect => newGlassIds.has(rect.glassId)); |
| | | // 计算新的矩形 |
| | | const newRects = data.outGlass[0].map(rect => { |
| | | const scaleFactor = 1390/5190; |
| | | const scaleFactor = 1390/6000; |
| | | const scaleFactory = 750/2800; |
| | | let adjustedWidth, adjustedHeight, adjustedWidtha, adjustedHeighta,widtha,heighta,newY; |
| | | let newX = rect.yCoordinate; |