Procházet zdrojové kódy

草稿箱图不可编辑

haojianlong před 4 roky
rodič
revize
3248c79ab2
2 změnil soubory, kde provedl 7 přidání a 3 odebrání
  1. 6 3
      src/components/mapClass/EditScence.ts
  2. 1 0
      src/views/drafts.vue

+ 6 - 3
src/components/mapClass/EditScence.ts

@@ -884,7 +884,7 @@ export class EditScence extends SGraphScene {
     //  以下为鼠标键盘操作事件
     onMouseDown(event: SMouseEvent): any {
         if (!this.isEditStatus) {
-            return super.onMouseDown(event);
+            return true
         }
         // 判断是否开启吸附,并且有吸附的点
         if (
@@ -936,7 +936,7 @@ export class EditScence extends SGraphScene {
 
     onMouseMove(event: SMouseEvent): boolean {
         if (!this.isEditStatus) {
-            return super.onMouseMove(event);
+            return true
         }
         if (this.isAbsorbing) {
             if (!this.highLight) {
@@ -950,6 +950,9 @@ export class EditScence extends SGraphScene {
     }
 
     onMouseUp(event: SMouseEvent): boolean {
+        if (!this.isEditStatus) {
+            return true
+        }
         if (this.grabItem) {
             if (this.grabItem instanceof SLineMarkerItem && this.grabItem.status == SItemStatus.Edit) {
                 this.setLineItem(event)
@@ -971,7 +974,7 @@ export class EditScence extends SGraphScene {
      */
     onKeyDown(event: KeyboardEvent): any {
         if (!this.isEditStatus) {
-            return super.onKeyDown(event);
+            return true
         }
         if (this.grabItem) {
             this.grabItem.onKeyDown(event);

+ 1 - 0
src/views/drafts.vue

@@ -468,6 +468,7 @@ export default {
     // 切换草稿箱楼层
     checkFloor(floorid) {
       this.scene = new EditScence();
+      this.scene.isEditStatus = false
       this.clearGraphy();
       const loadings = Loading.service({
         lock: true,