wangchuanjin 9 năm trước cách đây
mục cha
commit
a2ace97d23
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      core/src/web/staticres/js/relation.js

+ 4 - 4
core/src/web/staticres/js/relation.js

@@ -836,14 +836,14 @@ Relation.prototype.makeTextBg = function(){
 		text.each(function() {
             var box = this.getBBox();
 			//box.x = 0;
-            if (first || box.x < bounds.x1) {
-                bounds.x1 = box.x;
+            if (first || 0 < bounds.x1) {
+                bounds.x1 = 0;
             }
             if (first || box.y < bounds.y1) {
                 bounds.y1 = box.y;
             }
-            if (first || box.x + box.width > bounds.x2) {
-                bounds.x2 = box.x + box.width;
+            if (first || 0 + box.width > bounds.x2) {
+                bounds.x2 = 0 + box.width;
             }
             if (first || box.y + box.height > bounds.y2) {
                 bounds.y2 = box.y + box.height;