소스 검색

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

haojianlong 4 년 전
부모
커밋
8cce88743f
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/components/editview/baseTopoEditer.vue
  2. 3 0
      src/components/editview/topoTooltip.vue

+ 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();
     },
     // 关闭窗口