Explorar o código

修改矩形计算bug

haojianlong %!s(int64=4) %!d(string=hai) anos
pai
achega
b2b104d29c
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      persagy-web-draw/src/types/SRect.ts

+ 3 - 3
persagy-web-draw/src/types/SRect.ts

@@ -345,21 +345,21 @@ export class SRect {
             intersectMinY = rect.top;
         } else {
             minY = rect.top;
-            intersectMinY = rect.top;
+            intersectMinY = this.top;
         }
         if (this.right > rect.right) {
             maxX = this.right;
             intersectMaxX = rect.right;
         } else {
             maxX = rect.right;
-            intersectMaxX = rect.right;
+            intersectMaxX = this.right;
         }
         if (this.bottom > rect.bottom) {
             maxY = this.bottom;
             intersectMaxY = rect.bottom;
         } else {
             maxY = rect.bottom;
-            intersectMaxY = rect.bottom;
+            intersectMaxY = this.bottom;
         }
         if (
             this.width + rect.width > maxX - minX &&