于杰
2025-08-01 ee2c98d774c546f4bccf1ff3b80ba5415f179e5b
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/OptimizationRect.vue
@@ -563,7 +563,7 @@
  const newRect = { ...glassDetail };
  newRect.x += deltaX / scale;
  newRect.y -= deltaY / scale;
  newRect.y += deltaY / scale;
  const otherRects = layout.glassDetails.filter(r => !r.isRemain && r !== glassDetail);
  let isValidMove = true;
@@ -829,10 +829,10 @@
  switch (direction) {
    case 'up':
      glassDetail.y -= maxStep;
      glassDetail.y += maxStep;
      break;
    case 'down':
      glassDetail.y += maxStep;
      glassDetail.y -= maxStep;
      break;
    case 'left':
      glassDetail.x -= maxStep;
@@ -962,7 +962,7 @@
//向上移动计算坐标
const getAvailableSpaceUp = (glassDetail, layout, obstacles) => {
  let maxSpace = glassDetail.y;
  let maxSpace = layout.height - glassDetail.y - glassDetail.height;
  obstacles.forEach(obstacle => {
    if (obstacle.y > glassDetail.y + glassDetail.height &&
        obstacle.x <= glassDetail.x + glassDetail.width &&
@@ -975,7 +975,7 @@
//向下移动计算坐标
const getAvailableSpaceDown = (glassDetail, layout, obstacles) => {
  let maxSpace = layout.height - (glassDetail.y + glassDetail.height);;
  let maxSpace = glassDetail.y;
  obstacles.forEach(obstacle => {
    if (obstacle.y + obstacle.height < glassDetail.y &&
        obstacle.x <= glassDetail.x + glassDetail.width &&