瀏覽代碼

网络图优化

tyler 2 年之前
父節點
當前提交
52156b3109
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/components/TreeChart/index.vue

+ 2 - 2
src/components/TreeChart/index.vue

@@ -422,11 +422,11 @@ export default {
         this.center[1] = (dep * 1.5) + '0%';
         this.center[1] = (dep * 1.5) + '0%';
 
 
       }else if (newWidth > 500 && newWidth < 1000) {
       }else if (newWidth > 500 && newWidth < 1000) {
-        this.center[0] = '-10%';
+        this.center[0] = '-30%';
         this.center[1] = (dep) + '0%';
         this.center[1] = (dep) + '0%';
 
 
       } else if (newWidth > 1000){
       } else if (newWidth > 1000){
-        this.center[0] = elesArr.length > 60 ? newWidth * 1.2 : newWidth * 0.6;
+        this.center[0] = elesArr.length > 60 ? newWidth * 1.5 : newWidth * 1.2;
         this.center[1] = (dep ) + '0%';
         this.center[1] = (dep ) + '0%';
       }
       }
       this.chartWidth = newWidth;
       this.chartWidth = newWidth;