| | |
| | | widtha = rect.width; |
| | | heighta = rect.height; |
| | | } |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = heighta * 0.12; |
| | | adjustedHeight = widtha * 0.1; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | newX = 5087 - (rect.xCoordinate + heighta); |
| | | } else { |
| | | adjustedWidth = widtha * 0.12; |
| | | adjustedHeight = heighta * 0.1; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.xCoordinate + widtha); |
| | | } |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = widtha * 0.12; |
| | | adjustedHeight = heighta * 0.1; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.yCoordinate + widtha); |
| | | } else { |
| | | adjustedWidth = heighta * 0.12; |
| | | adjustedHeight = widtha * 0.1; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | newX = 5087 - (rect.yCoordinate + heighta); |
| | | } |
| | | // if (rect.angle === 0) { |
| | | // adjustedWidth = heighta * 0.12; |
| | | // adjustedHeight = widtha * 0.1; |
| | | // adjustedWidtha = heighta; |
| | | // adjustedHeighta = widtha; |
| | | // newX = 5087 - (rect.xCoordinate + heighta); |
| | | // } else { |
| | | // adjustedWidth = widtha * 0.12; |
| | | // adjustedHeight = heighta * 0.1; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | // newX = 5087 - (rect.xCoordinate + widtha); |
| | | // } |
| | | return { |
| | | ...rect, |
| | | xcoordinate: newX * 0.12, |
| | | ycoordinate: rect.yCoordinate * 0.1, |
| | | ycoordinate: rect.xCoordinate * 0.1, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |
| | |
| | | heighta = rect.height; |
| | | } |
| | | if (rect.angle === 0) { |
| | | adjustedWidth = heighta * 0.12; |
| | | adjustedHeight = widtha * 0.1; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | newX = 5087 - (rect.xCoordinate + heighta); |
| | | } else { |
| | | adjustedWidth = widtha * 0.12; |
| | | adjustedHeight = heighta * 0.1; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.xCoordinate + widtha); |
| | | adjustedWidth = widtha * 0.12; |
| | | adjustedHeight = heighta * 0.1; |
| | | adjustedWidtha = widtha; |
| | | adjustedHeighta = heighta; |
| | | newX = 5087 - (rect.yCoordinate + widtha); |
| | | } else { |
| | | adjustedWidth = heighta * 0.12; |
| | | adjustedHeight = widtha * 0.1; |
| | | adjustedWidtha = heighta; |
| | | adjustedHeighta = widtha; |
| | | newX = 5087 - (rect.yCoordinate + heighta); |
| | | } |
| | | // if (rect.angle === 0) { |
| | | // adjustedWidth = heighta * 0.12; |
| | | // adjustedHeight = widtha * 0.1; |
| | | // adjustedWidtha = heighta; |
| | | // adjustedHeighta = widtha; |
| | | // newX = 5087 - (rect.xCoordinate + heighta); |
| | | // } else { |
| | | // adjustedWidth = widtha * 0.12; |
| | | // adjustedHeight = heighta * 0.1; |
| | | // adjustedWidtha = widtha; |
| | | // adjustedHeighta = heighta; |
| | | // newX = 5087 - (rect.xCoordinate + widtha); |
| | | // } |
| | | return { |
| | | ...rect, |
| | | xcoordinate: newX * 0.12, |
| | | ycoordinate: rect.yCoordinate * 0.1, |
| | | ycoordinate: rect.xCoordinate * 0.1, |
| | | width: adjustedWidth, |
| | | height: adjustedHeight, |
| | | widtha: adjustedWidtha, |