YaolongHan 6 years ago
parent
commit
c2a6a74991
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/components/business_space/graphy/business.vue

+ 7 - 6
src/components/business_space/graphy/business.vue

@@ -947,14 +947,13 @@
                 items.map(item => {
                     if (item.id == id) {
                         //定位算法
-                        this.view.pos.x = -item.centerOfGravityPoint.x * this.view.scale +
-                            this.view.width / 2;
-                        this.view.pos.y = -item.centerOfGravityPoint.y * this.view.scale +
-                            this.view.height / 2;
-                        this.view.scale = this.view.scale;
+                        // this.view.pos.x = -item.centerOfGravityPoint.x * this.view.scale +
+                        //     this.view.width / 2;
+                        // this.view.pos.y = -item.centerOfGravityPoint.y * this.view.scale +
+                        //     this.view.height / 2;
+                        // this.view.scale = this.view.scale;
                         item.isBusiness = 3;
                         this.idList = [];
-                        console.log(item)
                         this.idList.push({
                             id: item.businessId,
                             name: item.businessName || '--'
@@ -964,6 +963,8 @@
                     } else {
                         item.isBusiness = 1;
                     }
+                //    获取空间后增加颜色
+                   this.isBusinessToColor(item)
                 });
             },
             /**  按钮事件  ---------------------------------------------------------------------- */