wangchuanjin 9 年之前
父節點
當前提交
a2ace97d23
共有 1 個文件被更改,包括 4 次插入4 次删除
  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;