Browse Source

fix:放大镜移动清除图片

jinx 2 years ago
parent
commit
6fed5c2b19
2 changed files with 9 additions and 1 deletions
  1. 3 0
      src/graphic/Controls/MoveMagnifier.js
  2. 6 1
      src/graphic/Geometry/Geometry.js

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

@@ -6,6 +6,9 @@ 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);
     } else {

+ 6 - 1
src/graphic/Geometry/Geometry.js

@@ -110,7 +110,12 @@ export default class Geometry {
   setWeight(weight) {
     this.weight = weight;
   }
-
+  setPhotoUrl(src) {
+    this.photoUrl = src;
+  }
+  setPhotoImg(type) {
+    this.photoImage = type;
+  }
   getType() {
     return this.type;
   }