xushiting 2 lat temu
rodzic
commit
6a3c469db3

Plik diff jest za duży
+ 1 - 1
server/test/SS-t-P1d6CwREny2/attach/sceneStore


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

@@ -2,6 +2,7 @@ import { coordinate } from "../Coordinate.js";
 import LayerEvents from "../enum/LayerEvents.js";
 import UIEvents from "../enum/UIEvents.js";
 import VectorType from "../enum/VectorType.js";
+import GeoActions from "../enum/GeoActions.js";
 import { stateService } from "../Service/StateService.js";
 import { uiService } from "../Service/UIService.js";
 import { dataService } from "../Service/DataService.js";
@@ -96,7 +97,27 @@ export default class UIControl {
     }
   }
 
-  handleGeo(action) {}
+  async handleGeo(action) {
+    let needAutoRedraw = false;
+    const item = stateService.getFocusItem();
+    if (item && item.vectorId) {
+      switch (action) {
+        case GeoActions.CopyAction:
+          await dataService.copyVector(item.vectorId, item.type);
+          needAutoRedraw = true;
+          break;
+        case GeoActions.DeleteAction:
+          dataService.deleteVector(item.vectorId, item.type);
+          needAutoRedraw = true;
+          break;
+      }
+    }
+
+    if (needAutoRedraw) {
+      this.layer.history.save();
+      this.layer.renderer.autoRedraw();
+    }
+  }
 
   /****************************************************************************针对菜单*******************************************************************************/
 
@@ -125,7 +146,8 @@ export default class UIControl {
   }
 
   menu_view_reset() {
-
+    coordinate.reSet(this.layer.canvas);
+    this.layer.renderer.autoRedraw();
   }
 
   // value 为true则开 false则关

+ 5 - 4
src/graphic/Coordinate.js

@@ -1,11 +1,12 @@
 const defaultZoom = 100;
+const defaultRes = 1;
 
 export default class Coordinate {
   constructor() {
     this.center = null; // 世界坐标,中心点。默认是[0,0]
     this.defaultZoom = defaultZoom;
     this.zoom = defaultZoom; // 当前缩放比例,不会改变世界坐标系的坐标,只是改变渲染时转换的屏幕坐标
-    this.res = 80; //比例尺。实际尺寸与屏幕像素的比例,用于测量。与之前的绘制不同,目前存储的数据与像素的比例是1:1,只是最后测量值再除以这个比例
+    this.res = defaultRes; //比例尺。实际尺寸与屏幕像素的比例,用于测量。与之前的绘制不同,目前存储的数据与像素的比例是1:1,只是最后测量值再除以这个比例
     this.ratio = 1; //不同硬件设备,像素率不同
 
     this.width == null;
@@ -116,9 +117,9 @@ export default class Coordinate {
 
   clear() {
     this.center = null;
-    this.zoom = 100;
-    this.res = 80;
-    this.ratio = 1;
+    this.zoom = defaultZoom;
+    this.res = defaultRes;
+    this.ratio = defaultRes;
   }
 }
 

+ 1 - 2
src/graphic/History/HistoryUtil.js

@@ -63,8 +63,7 @@ export default class HistoryUtil {
   isDifferentForMagnifiers(magnifier1, magnifier2) {
     if (
       mathUtil.equalPoint(magnifier1.position, magnifier2.position) &&
-      magnifier1.photoUrl == magnifier2.photoUrl &&
-      mathUtil.equalPoint(magnifier1.popPosition, magnifier2.popPosition)
+      magnifier1.photoUrl == magnifier2.photoUrl
     ) {
       return false;
     } else {

+ 1 - 1
src/graphic/Layer.js

@@ -783,7 +783,7 @@ export default class Layer {
       dataService.setGridForZoom(
         coordinate.width,
         coordinate.height,
-        coordinate.zoom / coordinate.defaultZoom
+        (coordinate.res * coordinate.zoom) / coordinate.defaultZoom
       );
       this.renderer.autoRedraw();
     }

+ 4 - 2
src/graphic/Load.js

@@ -21,7 +21,7 @@ export default class Load {
       if (dataLocal.backgroundImg) {
         let bgImg = imageService.create(
           dataLocal.backgroundImg.src,
-          dataLocal.vectorId
+          dataLocal.backgroundImg.vectorId
         );
         bgImg.setCenter(dataLocal.backgroundImg.center);
         bgImg.setDisplay(dataLocal.backgroundImg.display);
@@ -48,7 +48,6 @@ export default class Load {
             dataLocal.magnifiers[key].position,
             key
           );
-          magnifier.setPopPosition(dataLocal.magnifiers[key].popPosition);
           magnifier.setSrc(dataLocal.magnifiers[key].photoUrl);
           magnifier.setDisplay(dataLocal.magnifiers[key].display);
           try {
@@ -92,6 +91,9 @@ export default class Load {
           line.setDisplay(dataLocal.lines[key].display);
         }
       }
+      if (dataLocal.hasOwnProperty("currentId")) {
+        dataService.setCurrentId(dataLocal.currentId);
+      }
     }
     if (data3d) {
       if (data3d.backImage) {

+ 85 - 87
src/graphic/Renderer/Draw.js

@@ -8,7 +8,7 @@ import ElementEvents from "../enum/ElementEvents.js";
 import { elementService } from "../Service/ElementService.js";
 import UIEvents from "@/graphic/enum/UIEvents.js";
 
-const imgCache = {}
+const imgCache = {};
 const help = {
   getVectorStyle(vector, geoType = vector.geoType) {
     const geoId = vector?.vectorId;
@@ -86,29 +86,29 @@ const help = {
     if (imgCache[src]) {
       return imgCache[src];
     }
-    const img = new Image()
-    img.src = src
-    return imgCache[src] = new Promise(resolve => {
+    const img = new Image();
+    img.src = src;
+    return (imgCache[src] = new Promise((resolve) => {
       img.onload = () => {
-        resolve(img)
-      }
-    })
-  }
+        resolve(img);
+      };
+    }));
+  },
 };
 
 export default class Draw {
   constructor() {
-    this.canvas = null
+    this.canvas = null;
     this.context = null;
   }
 
   initContext(canvas) {
     if (canvas) {
-      this.canvas = canvas
+      this.canvas = canvas;
       this.context = canvas.getContext("2d");
     } else {
       this.context = null;
-      this.canvas = null
+      this.canvas = null;
     }
   }
 
@@ -122,10 +122,10 @@ export default class Draw {
   }
 
   drawBackGroundImg(vector) {
-    console.log(vector)
-    const img = vector.imageData
-    const width = help.getReal(img.width)
-    const height = help.getReal(img.height)
+    console.log(vector);
+    const img = vector.imageData;
+    const width = help.getReal(img.width);
+    const height = help.getReal(img.height);
     const center = coordinate.getScreenXY(vector.center);
     this.context.save();
     this.context.drawImage(
@@ -134,7 +134,7 @@ export default class Draw {
       center.y - height / 2,
       width,
       height
-    )
+    );
     this.context.restore();
   }
 
@@ -298,13 +298,15 @@ export default class Draw {
       end
     );
     const pt = mathUtil.twoOrderBezier2(0.5, start, pt2, end);
-
+    const extremePoint = coordinate.getScreenXY(vector.extremePoint);
     const ctx = this.context;
     ctx.save();
     ctx.beginPath();
     ctx.arc(
-      pt.x,
-      pt.y,
+      // pt.x,
+      // pt.y,
+      extremePoint.x,
+      extremePoint.y,
       Style.ControlPoint.radius * coordinate.ratio,
       0,
       Math.PI * 2,
@@ -391,31 +393,27 @@ export default class Draw {
     const start = coordinate.getScreenXY(startReal);
     const endReal = dataService.getPoint(vector.endId);
     const end = coordinate.getScreenXY(endReal);
-    const ctx = this.context
+    const ctx = this.context;
 
-    const ange = 30
+    const ange = 30;
     const L = 20;
-    let a = Math.atan2((end.y - start.y), (end.x - start.x));
-    let xC = end.x - L * Math.cos(a + ange * Math.PI/180); // θ=30
-    let yC = end.y - L * Math.sin(a + ange * Math.PI/180);
-    let xD = end.x - L * Math.cos(a - ange * Math.PI/180);
-    let yD = end.y - L * Math.sin(a - ange * Math.PI/180);
-    ctx.save()
+    let a = Math.atan2(end.y - start.y, end.x - start.x);
+    let xC = end.x - L * Math.cos(a + (ange * Math.PI) / 180); // θ=30
+    let yC = end.y - L * Math.sin(a + (ange * Math.PI) / 180);
+    let xD = end.x - L * Math.cos(a - (ange * Math.PI) / 180);
+    let yD = end.y - L * Math.sin(a - (ange * Math.PI) / 180);
+    ctx.save();
 
-    const style = help.setVectorStyle(
-      this.context,
-      vector,
-      'Arrow'
-    );
+    const style = help.setVectorStyle(this.context, vector, "Arrow");
     if (vector.arrowColor) {
-      ctx.strokeStyle = vector.arrowColor
+      ctx.strokeStyle = vector.arrowColor;
     }
     ctx.beginPath();
 
     ctx.moveTo(start.x, start.y);
     ctx.lineTo(end.x, end.y);
 
-    const lines = mathUtil.getArrow(start, end)
+    const lines = mathUtil.getArrow(start, end);
     ctx.moveTo(lines[0].x, lines[0].y);
     ctx.lineTo(lines[1].x, lines[1].y);
     ctx.lineTo(lines[2].x, lines[2].y);
@@ -423,81 +421,81 @@ export default class Draw {
     ctx.restore();
 
     if ([Style.Focus.Arrow, Style.Select.Arrow].includes(style)) {
-      this.drawPoint(startReal)
-      this.drawPoint(endReal)
+      this.drawPoint(startReal);
+      this.drawPoint(endReal);
     }
   }
 
   drawMagnifier(vector) {
-    const ctx = this.context
+    const ctx = this.context;
     this.drawPoint({
       ...vector,
       ...vector.position,
       radius: Style.Magnifier.radius,
-    })
-    const pt = coordinate.getScreenXY(vector.position)
-    const target = coordinate.getScreenXY(vector.popPosition)
-    const style = help.setVectorStyle(ctx, vector)
+    });
+    const pt = coordinate.getScreenXY(vector.position);
+    const target = coordinate.getScreenXY(vector.popPosition);
+    const style = help.setVectorStyle(ctx, vector);
     const radius =
       ((vector.radius || style.radius) * coordinate.ratio * coordinate.zoom) /
       coordinate.defaultZoom;
-    const offset = radius / 2
-    const targetPts = style === Style.Focus.Magnifier ? [
-      mathUtil.translate(pt, target, pt, radius),
-      target
-    ] : null
+    const offset = radius / 2;
+    const targetPts =
+      style === Style.Focus.Magnifier
+        ? [mathUtil.translate(pt, target, pt, radius), target]
+        : null;
 
     ctx.save();
-    ctx.beginPath()
-    ctx.moveTo(pt.x - offset, pt.y)
-    ctx.lineTo(pt.x + offset, pt.y)
+    ctx.beginPath();
+    ctx.moveTo(pt.x - offset, pt.y);
+    ctx.lineTo(pt.x + offset, pt.y);
     ctx.stroke();
-    ctx.beginPath()
-    ctx.moveTo(pt.x, pt.y - offset)
-    ctx.lineTo(pt.x, pt.y + offset)
+    ctx.beginPath();
+    ctx.moveTo(pt.x, pt.y - offset);
+    ctx.lineTo(pt.x, pt.y + offset);
     ctx.stroke();
 
     if (targetPts) {
-      ctx.beginPath()
-      ctx.moveTo(targetPts[0].x, targetPts[0].y)
-      ctx.lineTo(targetPts[1].x, targetPts[1].y)
+      ctx.beginPath();
+      ctx.moveTo(targetPts[0].x, targetPts[0].y);
+      ctx.lineTo(targetPts[1].x, targetPts[1].y);
       ctx.stroke();
 
-      let img, imgBound
+      let img, imgBound;
       if (vector.photoImage) {
-        img = vector.photoImage
-        imgBound = [0, 0, img.width, img.height]
+        img = vector.photoImage;
+        imgBound = [0, 0, img.width, img.height];
       } else {
-        const size = style.target.realRadius
-        const backImg = dataService.getBackgroundImg()
-        img = backImg.imageData
-        const imgCenter = coordinate.getScreenXY(backImg.center)
+        const size = style.target.realRadius;
+        const backImg = dataService.getBackgroundImg();
+        img = backImg.imageData;
+        const imgCenter = coordinate.getScreenXY(backImg.center);
         const start = {
           x: imgCenter.x - img.width / 2,
-          y: imgCenter.y - img.height / 2
-        }
+          y: imgCenter.y - img.height / 2,
+        };
         imgBound = [
           pt.x - start.x - size,
           pt.y - start.y - size,
           size * 2,
-          size * 2
-        ]
+          size * 2,
+        ];
       }
       const size = help.getReal(style.target.radius);
-      ctx.beginPath()
-      ctx.arc(target.x, target.y, size, 0, 2*Math.PI);
-      ctx.clip()
+      ctx.beginPath();
+      ctx.arc(target.x, target.y, size, 0, 2 * Math.PI);
+      ctx.clip();
       ctx.drawImage(
         img,
         ...imgBound,
         target.x - size,
         target.y - size,
-        size*2,
-        size*2
+        size * 2,
+        size * 2
       );
-      ctx.strokeStyle = style.target.strokeStyle
-      ctx.lineWidth = style.target.lineWidth
-      ctx.stroke()
+      ctx.strokeStyle = style.target.strokeStyle;
+      ctx.lineWidth = style.target.lineWidth;
+      ctx.stroke();
     }
     ctx.restore();
   }
@@ -505,11 +503,11 @@ export default class Draw {
   drawCircle(element) {
     this.drawPoint({
       ...element,
-      geoType: 'Circle',
-      ...element.center
+      geoType: "Circle",
+      ...element.center,
     });
 
-    element.points.forEach(point => this.drawPoint(point))
+    element.points.forEach((point) => this.drawPoint(point));
   }
 
   drawPoint(vector) {
@@ -517,9 +515,9 @@ export default class Draw {
     const ctx = this.context;
     const style = help.setVectorStyle(ctx, vector, vector.geoType || "Point");
     if (vector.color) {
-      ctx.strokeStyle = vector.color
+      ctx.strokeStyle = vector.color;
     }
-    const radius = help.getReal(vector.radius || style.radius)
+    const radius = help.getReal(vector.radius || style.radius);
     ctx.save();
     ctx.beginPath();
     ctx.arc(pt.x, pt.y, radius, 0, Math.PI * 2, true);
@@ -541,8 +539,8 @@ export default class Draw {
 
     const pt = coordinate.getScreenXY(position);
     const text = ctx.measureText(txt);
-    pt.x -= text.width / 2
-    pt.y += (text.actualBoundingBoxAscent + text.actualBoundingBoxDescent) / 2
+    pt.x -= text.width / 2;
+    pt.y += (text.actualBoundingBoxAscent + text.actualBoundingBoxDescent) / 2;
     if (angle) {
       ctx.translate(pt.x, pt.y);
       ctx.rotate(angle);
@@ -556,19 +554,19 @@ export default class Draw {
   // 文字
   drawText(vector) {
     help.setVectorStyle(this.context, vector);
-    this.context.fillStyle = vector.color
-    const oldFont = this.context.font
-    this.context.font = `${vector.fontSize}px Microsoft YaHei`
+    this.context.fillStyle = vector.color;
+    const oldFont = this.context.font;
+    this.context.font = `${vector.fontSize}px Microsoft YaHei`;
     this.drawTextByInfo(vector.center, vector.value, 0, false);
-    this.context.font = oldFont
+    this.context.font = oldFont;
   }
 
   drawLine(vector) {
-    console.log(vector)
+    console.log(vector);
     if ([UIEvents.Arrow, UIEvents.MeasureLine].includes(vector.category)) {
       return this.drawArrow(vector);
     }
-    console.log(vector)
+    console.log(vector);
     let start = dataService.getPoint(vector.startId);
     start = coordinate.getScreenXY(start);
     let end = dataService.getPoint(vector.endId);

+ 11 - 0
src/graphic/Service/CircleService.js

@@ -1,9 +1,11 @@
 import Point from "../Geometry/Point.js";
 import Circle from "../Geometry/Circle.js";
 import { dataService } from "./DataService.js";
+import { uiService } from "./UIService.js";
 import VectorCategory from "../enum/VectorCategory.js";
 import { mathUtil } from "../Util/MathUtil.js";
 import Constant from "../Constant.js";
+
 export default class CircleService {
   constructor() {}
 
@@ -15,6 +17,15 @@ export default class CircleService {
     dataService.addCircle(circle);
     return circle;
   }
+
+  copy(vectorId) {
+    let circle = dataService.getCircle(vectorId);
+    let center = uiService.getNewPositionForPop(circle.center);
+    let radius = circle.radius;
+    let newCircle = this.create(center, radius);
+    newCircle.setColor(circle.color);
+    return newCircle;
+  }
 }
 
 const circleService = new CircleService();

+ 62 - 6
src/graphic/Service/DataService.js

@@ -1,5 +1,12 @@
 import Line from "../Geometry/Line.js";
 import CurveLine from "../Geometry/CurveLine.js";
+import VectorType from "../enum/VectorType.js";
+import { coordinate } from "../Coordinate.js";
+import { lineService } from "./LineService.js";
+import { uiService } from "./UIService.js";
+import { circleService } from "./CircleService.js";
+import { textService } from "./TextService.js";
+import { magnifierService } from "./MagnifierService.js";
 
 export class DataService {
   constructor() {
@@ -12,20 +19,21 @@ export class DataService {
       defalutstep2: 250,
       display: true,
     };
-    this.vectorData = {};
-    this.currentId = 0; // 当前可用id
+    this.vectorData = {
+      currentId: 0, // 当前可用id
+    };
   }
 
   setCurrentId(id) {
-    this.currentId = id;
+    this.vectorData.currentId = id;
   }
 
   getCurrentId() {
-    return this.currentId;
+    return this.vectorData.currentId;
   }
 
   updateCurrentId() {
-    ++this.currentId;
+    ++this.vectorData.currentId;
   }
 
   getVectorData() {
@@ -66,6 +74,18 @@ export class DataService {
   setGridForPan(dx, dy) {
     this.grid.startX += dx;
     this.grid.startY += dy;
+    this.grid.step1 =
+      (this.grid.defalutstep1 * coordinate.res * coordinate.zoom) /
+      coordinate.defaultZoom;
+    this.grid.step2 =
+      (this.grid.defalutstep2 * coordinate.res * coordinate.zoom) /
+      coordinate.defaultZoom;
+    while (this.grid.startX > 0) {
+      this.grid.startX -= this.grid.step2;
+    }
+    while (this.grid.startY > 0) {
+      this.grid.startY -= this.grid.step2;
+    }
   }
 
   setGridForZoom(w, h, ratio) {
@@ -75,7 +95,7 @@ export class DataService {
     this.grid.step1 = this.grid.defalutstep1 * ratio;
     this.grid.step2 = this.grid.defalutstep2 * ratio;
     while (this.grid.startX > 0) {
-      this.grid.startX -= this.grid.step1;
+      this.grid.startX -= this.grid.step2;
     }
     while (this.grid.startY > 0) {
       this.grid.startY -= this.grid.step2;
@@ -473,6 +493,42 @@ export class DataService {
     return this.vectorData.svgs;
   }
 
+  //删除按钮
+  deleteVector(vectorId, geoType) {
+    switch (geoType) {
+      case VectorType.Line:
+        this.deleteLine(vectorId);
+        break;
+      case VectorType.Circle:
+        this.deleteCircle(vectorId);
+        break;
+      case VectorType.Text:
+        this.deleteText(vectorId);
+        break;
+      case VectorType.Magnifier:
+        this.deleteMagnifier(vectorId);
+        break;
+    }
+  }
+
+  //复制按钮
+  async copyVector(vectorId, geoType) {
+    switch (geoType) {
+      case VectorType.Line:
+        lineService.copy(vectorId);
+        break;
+      case VectorType.Circle:
+        circleService.copy(vectorId);
+        break;
+      case VectorType.Text:
+        textService.copy(vectorId);
+        break;
+      case VectorType.Magnifier:
+        await magnifierService.copy(vectorId);
+        break;
+    }
+  }
+
   clear() {
     //直路
     this.vectorData.roadPoints = {};

+ 12 - 0
src/graphic/Service/LineService.js

@@ -3,6 +3,7 @@ import Line from "../Geometry/Line.js";
 import { dataService } from "./DataService.js";
 import VectorCategory from "../enum/VectorCategory.js";
 import { mathUtil } from "../Util/MathUtil.js";
+import { uiService } from "./UIService.js";
 
 export default class LineService {
   constructor() {}
@@ -37,6 +38,17 @@ export default class LineService {
     dataService.addLine(line);
     return line;
   }
+
+  copy(vectorId) {
+    let line = dataService.getLine(vectorId);
+    let startPoint = dataService.getPoint(line.startId);
+    let endPoint = dataService.getPoint(line.endId);
+    startPoint = uiService.getNewPositionForPop(startPoint);
+    endPoint = uiService.getNewPositionForPop(endPoint);
+    let newLine = this.create(startPoint, endPoint, line.category);
+    newLine.setArrowColor(line.arrowColor);
+    return newLine;
+  }
 }
 
 const lineService = new LineService();

+ 14 - 0
src/graphic/Service/MagnifierService.js

@@ -1,6 +1,7 @@
 import Magnifier from "../Geometry/Magnifier.js";
 import { dataService } from "./DataService.js";
 import { mathUtil } from "../Util/MathUtil.js";
+import { uiService } from "./UIService.js";
 
 export default class MagnifierService {
   constructor() {}
@@ -11,6 +12,19 @@ export default class MagnifierService {
     dataService.addMagnifier(magnifier);
     return magnifier;
   }
+
+  async copy(vectorId) {
+    const magnifier = dataService.getMagnifier(vectorId);
+    let newPosition = uiService.getNewPositionForPop(magnifier.position);
+    let newMagnifier = this.create(newPosition);
+    newMagnifier.setSrc(magnifier.photoUrl);
+    try {
+      await newMagnifier.setImageData();
+      return newMagnifier;
+    } catch (e) {
+      dataService.deleteMagnifier(newMagnifier.vectorId);
+    }
+  }
 }
 
 const magnifierService = new MagnifierService();

+ 11 - 0
src/graphic/Service/TextService.js

@@ -1,6 +1,7 @@
 import Text from "../Geometry/Text.js";
 import { dataService } from "./DataService.js";
 import { mathUtil } from "../Util/MathUtil.js";
+import { uiService } from "./UIService.js";
 
 export default class TextService {
   constructor() {}
@@ -11,6 +12,16 @@ export default class TextService {
     dataService.addText(text);
     return text;
   }
+
+  copy(vectorId) {
+    let text = dataService.getText(vectorId);
+    let center = uiService.getNewPositionForPop(text.center);
+    let newText = this.create(center);
+    newText.setColor(text.color);
+    newText.setValue(text.value);
+    newText.setFontSize(text.fontSize);
+    return newText;
+  }
 }
 
 const textService = new TextService();

+ 23 - 0
src/graphic/Service/UIService.js

@@ -2,6 +2,7 @@ import Text from "../Geometry/Text.js";
 import { dataService } from "./DataService.js";
 import { mathUtil } from "../Util/MathUtil.js";
 import Setting from "../Setting";
+import { coordinate } from "../Coordinate.js";
 
 export default class UIService {
   constructor() {}
@@ -62,6 +63,28 @@ export default class UIService {
   setCurveRoadRightDrivewayCount(value) {
     Setting.curveRoadRightDrivewayCount = value;
   }
+
+  //如果position在屏幕左上角,返回的就朝向右下角,如果是右下角,则返回的是左上角。其他情况以此类推
+  getNewPositionForPop(position) {
+    const offset = 50;
+    const center = coordinate.getXYFromScreen({
+      x: coordinate.width / 2,
+      y: coordinate.height / 2,
+    });
+    let newPosition = {};
+    mathUtil.clonePoint(newPosition, position);
+    if (position.x > center.x) {
+      newPosition.x -= offset;
+    } else if (position.x < center.x) {
+      newPosition.x += offset;
+    }
+    if (position.y > center.y) {
+      newPosition.y -= offset;
+    } else if (position.y < center.y) {
+      newPosition.y += offset;
+    }
+    return newPosition;
+  }
 }
 
 const uiService = new UIService();

+ 0 - 6
src/graphic/enum/Action.js

@@ -1,6 +0,0 @@
-const GeoActions = {
-  DeleteAction: "DeleteAction",
-  CopyAction: "CopyAction"
-}
-
-export default GeoActions

+ 6 - 0
src/graphic/enum/GeoActions.js

@@ -0,0 +1,6 @@
+const GeoActions = {
+  DeleteAction: "DeleteAction",
+  CopyAction: "CopyAction",
+};
+
+export default GeoActions;

+ 1 - 1
src/views/graphic/geos/arrow.vue

@@ -19,7 +19,7 @@ import UiIcon from "@/components/base/components/icon/index.vue";
 import {drawRef, FocusVector, uiType, UIType} from '@/hook/useGraphic'
 import {computed, ref, watch, watchEffect} from "vue";
 import {dataService} from "@/graphic/Service/DataService";
-import GeoActions from "@/graphic/enum/Action"
+import GeoActions from "@/graphic/enum/GeoActions"
 import {debounce} from "@/utils";
 
 const props = defineProps<{geo: FocusVector}>()

+ 1 - 1
src/views/graphic/geos/circle.vue

@@ -19,7 +19,7 @@ import {drawRef, FocusVector, uiType, UIType} from '@/hook/useGraphic'
 import {computed, ref, watch, watchEffect} from "vue";
 import {dataService} from "@/graphic/Service/DataService";
 import {debounce} from "@/utils";
-import GeoActions from "@/graphic/enum/Action";
+import GeoActions from "@/graphic/enum/GeoActions";
 
 
 const props = defineProps<{geo: FocusVector}>()

+ 1 - 1
src/views/graphic/geos/magnifier.vue

@@ -20,7 +20,7 @@ import {drawRef, FocusVector, uiType, UIType} from '@/hook/useGraphic'
 import {computed, ref, watch} from "vue";
 import {dataService} from "@/graphic/Service/DataService";
 import {getStaticFile} from "@/dbo/main";
-import GeoActions from "@/graphic/enum/Action";
+import GeoActions from "@/graphic/enum/GeoActions";
 
 const props = defineProps<{geo: FocusVector}>()
 const vector = computed(() => dataService.getMagnifier(props.geo.vectorId))

+ 1 - 1
src/views/graphic/geos/text.vue

@@ -31,7 +31,7 @@ import {uiType, UIType, FocusVector, drawRef} from '@/hook/useGraphic'
 import {computed, ref, watch, watchEffect} from "vue";
 import {dataService} from "@/graphic/Service/DataService";
 import {debounce} from '@/utils/index'
-import GeoActions from "@/graphic/enum/Action";
+import GeoActions from "@/graphic/enum/GeoActions";
 
 const props = defineProps<{geo: FocusVector}>()
 const vector = computed(() => dataService.getText(props.geo.vectorId))