Forráskód Böngészése

修改道路交互

bill 2 éve
szülő
commit
d144dba132

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1986 - 3
src/graphic/CanvasStyle/ImageLabels/SVGIcons.js


+ 1 - 4
src/graphic/Renderer/Draw.js

@@ -2,14 +2,11 @@ import { dataService } from "../Service/DataService.js";
 import { stateService } from "../Service/StateService.js";
 import { coordinate } from "../Coordinate.js";
 import Style from "@/graphic/CanvasStyle/index.js";
-import VectorType from "../enum/VectorType.js";
 import { mathUtil } from "../Util/MathUtil.js";
-import ElementEvents from "../enum/ElementEvents.js";
 import { elementService } from "../Service/ElementService.js";
 import UIEvents from "@/graphic/enum/UIEvents.js";
 import VectorCategory from "@/graphic/enum/VectorCategory.js";
 import Settings from "@/graphic/Settings.js";
-import { Canvg } from "canvg";
 import SVGIcons from "../CanvasStyle/ImageLabels/SVGIcons";
 
 const imgCache = {};
@@ -766,7 +763,7 @@ export default class Draw {
     this.context.scale(width / svgWidth, height / svgHidth);
     const [style] = help.setVectorStyle(this.context, vector);
     this.context.lineWidth = style.lineWidth / (width / svgWidth);
-    SVGIcons.keche_plane.draw(this.context);
+    SVGIcons['chemotuoche_p.svg'].draw(this.context);
 
     if (import.meta.env.DEV) {
       this.context.restore();

+ 2 - 0
src/views/graphic/geos/index.ts

@@ -14,6 +14,8 @@ export const GlobalComp = Del
 export default {
   [VectorType.Road]: Road,
   [VectorType.RoadEdge]: RoadEdge,
+  [VectorType.CurveRoad]: Road,
+  [VectorType.CurveRoadEdge]: RoadEdge,
   [VectorType.SingleArrowLine]: Arrow,
   [VectorType.DoubleArrowLine]: Arrow,
   // [VectorCategory.Line.MeasureLine]: Arrow,

+ 3 - 0
src/views/graphic/imageLabel.vue

@@ -0,0 +1,3 @@
+<template>
+
+</template>

+ 2 - 0
src/views/graphic/index.vue

@@ -9,6 +9,7 @@
         :menus="store.child.value as any"
         @quit="store.child.value = null"
     />
+    <ImageLabel v-if="store.activeMenuKey.value === UITypeExtend.image" />
 
     <GraphicAction class="full-action">
       <ui-icon
@@ -30,6 +31,7 @@ import Container from './container.vue'
 import GraphicAction from '@/components/button-pane/index.vue'
 import UiIcon from "@/components/base/components/icon/index.vue";
 import Confirm from './confirm.vue'
+import ImageLabel from "./imageLabel.vue";
 import {router} from '@/router'
 import {computed} from "vue";
 import {customMap} from '@/hook'

+ 6 - 6
src/views/graphic/menus.ts

@@ -148,9 +148,9 @@ export const mainMenusRaw: MenusRaw = [
     key: UITypeExtend.image,
     text: "图例",
     icon: "road",
-    children: [
-      { key: UIType.BusPlane, text: "客车平面图" }
-    ]
+    // children: [
+    //   { key: UIType.BusPlane, text: "客车平面图" }
+    // ]
   },
   {
     key: UITypeExtend.measure,
@@ -163,9 +163,9 @@ export const mainMenusRaw: MenusRaw = [
 ];
 
 if (import.meta.env.DEV) {
-  // mainMenusRaw.unshift(
-  //   { key: UIType.CurveRoad, text: "弯路", icon: "road", }
-  // )
+  mainMenusRaw.unshift(
+    { key: UIType.CurveRoad, text: "弯路", icon: "road", }
+  )
 }
 
 export const photoMenusRaw: MenusRaw = [