Преглед изворни кода

Merge remote-tracking branch 'origin/master'

bill пре 2 година
родитељ
комит
8d1a66682b
3 измењених фајлова са 11 додато и 4 уклоњено
  1. 3 2
      src/graphic/Controls/MoveMagnifier.js
  2. 6 2
      src/graphic/Controls/UIControl.js
  3. 2 0
      src/graphic/Load.js

+ 3 - 2
src/graphic/Controls/MoveMagnifier.js

@@ -7,10 +7,11 @@ export default class MoveMagnifier {
   moveFullMagnifier(position, magnifierId, index) {
     let magnifier = dataService.getMagnifier(magnifierId);
     //移动放大镜清除图片信息
-    magnifier.setPhotoUrl(null)
-    magnifier.setPhotoImg(null)
+
     if (index == 0) {
       magnifier.setPosition(position);
+      magnifier.setPhotoUrl(null)
+      magnifier.setPhotoImg(null)
     } else {
       const popPosition = coordinate.getScreenXY(position);
       magnifier.popPosition = {

+ 6 - 2
src/graphic/Controls/UIControl.js

@@ -528,7 +528,7 @@ export default class UIControl {
     this.layer.renderer.autoRedraw();
   }
 
-  menu_clear() {
+  menu_clear(isBack) {
     dataService.clear();
     Settings.selectLocationMode = null;
     Settings.baseLineId = null;
@@ -536,7 +536,11 @@ export default class UIControl {
     elementService.hideAll();
     this.layer.exit();
     this.layer.initLocation();
-    this.layer.history.save();
+    if(!isBack){
+      this.layer.history.save();
+    }else{
+      historyService.clearHistoryRecord()
+    }
     this.layer.renderer.autoRedraw();
   }
 

+ 2 - 0
src/graphic/Load.js

@@ -14,6 +14,7 @@ import { magnifierService } from "./Service/MagnifierService.js";
 import { textService } from "./Service/TextService.js";
 import { svgService } from "./Service/SVGService.js";
 import { mathUtil } from "./Util/MathUtil.js";
+import { historyService } from "./Service/HistoryService.js";
 
 export default class Load {
   constructor(layer) {
@@ -280,6 +281,7 @@ export default class Load {
       this.layer.updateForLocation();
     }
     this.layer.history.init();
+
     this.layer.renderer.autoRedraw();
   }