Browse Source

editer:feat:右键菜单功能对接;下载图片调整

haojianlong 4 years ago
parent
commit
8cce88743f

+ 1 - 1
src/components/editview/baseTopoEditer.vue

@@ -177,7 +177,7 @@ export default {
         // 隐藏选择器
         this.scene.selectContainer.clear();
         setTimeout(() => {
-          this.view.saveImage(`${this.topoContent.name}.png`, "png");
+          this.view.saveImageSize(`${this.topoContent.name}.png`, "png", this.canvasWidth, this.canvasHeight);
         }, 80);
       });
       // 发布图片

+ 3 - 0
src/components/editview/topoTooltip.vue

@@ -55,14 +55,17 @@ export default {
     },
     // 保存图
     saveGraph() {
+      bus.$emit('saveTopo');
       this.closetooltip();
     },
     // 发布图
     publishGraph() {
+      bus.$emit('issueTopo');
       this.closetooltip();
     },
     // 下载
     downPng() {
+      bus.$emit('saveTopoImg');
       this.closetooltip();
     },
     // 关闭窗口