|
|
@ -131,6 +131,10 @@ const addSelect = () => { |
|
|
|
|| newBoundBox.y < 0 |
|
|
|
|| newBoundBox.x + newBoundBox.width > stageWidth |
|
|
|
|| newBoundBox.y + newBoundBox.height > stageHeight |
|
|
|
|| oldBoundBox.width - (newBoundBox.x - oldBoundBox.x) < 25 |
|
|
|
|| newBoundBox.width < 25 |
|
|
|
|| oldBoundBox.height - (newBoundBox.y - oldBoundBox.y) < 25 |
|
|
|
|| newBoundBox.height < 25 |
|
|
|
) { |
|
|
|
return oldBoundBox // 满足任一条件则拒绝调整 |
|
|
|
} |
|
|
|