Selaa lähdekoodia

修改矩形计算bug

haojianlong 4 vuotta sitten
vanhempi
commit
b2b104d29c
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  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 &&