bill 1 سال پیش
والد
کامیت
39a0553bf2

+ 14 - 13
src/graphic/Renderer/Draw.js

@@ -10,14 +10,18 @@ import Settings from "@/graphic/Settings.js";
 import SVGIcons from "../CanvasStyle/ImageLabels/SVGIcons";
 import VectorStyle from "@/graphic/enum/VectorStyle.js";
 import VectorWeight from "@/graphic/enum/VectorWeight.js";
+import router from "@/router/index";
+
+const isScreenStyle = () =>
+  Settings.screenMode && router.currentRoute.value.params.mode === "0";
 
 const imgCache = {};
 export const help = {
   getVectorStyle(vector, geoType = vector.geoType) {
     const geoId = vector?.vectorId;
-    if (!geoId || Settings.screenMode) {
+    if (!geoId || isScreenStyle()) {
       return [
-        Settings.screenMode && Style["Screen"][geoType]
+        isScreenStyle() && Style["Screen"][geoType]
           ? Style["Screen"][geoType]
           : Style[geoType],
         undefined,
@@ -201,7 +205,7 @@ export const help = {
     ctx.font = `${fontSize}px Microsoft YaHei`;
     const textCenter = help.getTextCenter(ctx, text);
     ctx.fillStyle = style.backColor;
-    if (!Settings.screenMode) {
+    if (!isScreenStyle()) {
       // const padding = style.padding;
       // help.roundRect(
       //   ctx,
@@ -594,7 +598,7 @@ export default class Draw {
       const [style] = help.setVectorStyle(this.context, vector, ["NormalLine"]);
       help.drawStyleLine(this.context, [start, end]);
       help.drawLineText(this.context, start, end, width, {
-        fillColor: Settings.screenMode ? "#000" : "#fff",
+        fillColor: isScreenStyle() ? "#000" : "#fff",
         padding: 6,
         fontSize: 12,
         backColor: style.strokeStyle,
@@ -756,7 +760,7 @@ export default class Draw {
     ctx.save();
     help.setVectorStyle(ctx, vector);
     ctx.beginPath();
-    if (!Settings.screenMode) {
+    if (!isScreenStyle()) {
       ctx.arc(
         extremePoint.x,
         extremePoint.y,
@@ -1114,7 +1118,7 @@ export default class Draw {
     const screenNotDrawTypes = [VectorCategory.Point.NormalPoint];
     if (!screenSave) {
       if (
-        (Settings.screenMode &&
+        (isScreenStyle() &&
           (!vector.category || screenNotDrawTypes.includes(vector.category))) ||
         vector.category === VectorCategory.Point.TestBasePoint
       ) {
@@ -1150,8 +1154,8 @@ export default class Draw {
       if (text) {
         style = {
           ...style,
-          fillStyle: Settings.screenMode ? "#000" : text.color,
-          strokeStyle: Settings.screenMode ? "#000" : text.color,
+          fillStyle: isScreenStyle() ? "#000" : text.color,
+          strokeStyle: isScreenStyle() ? "#000" : text.color,
         };
       }
     }
@@ -1180,10 +1184,7 @@ export default class Draw {
       ctx.restore();
     };
 
-    if (
-      Settings.selectBasePointId === vector.vectorId &&
-      !Settings.screenMode
-    ) {
+    if (Settings.selectBasePointId === vector.vectorId && !isScreenStyle()) {
       style = {
         ...style,
         fillStyle: "rgba(255, 143, 40, 1)",
@@ -1276,7 +1277,7 @@ export default class Draw {
     }
     this.context.save();
     const [_, foo] = help.setVectorStyle(this.context, vector);
-    const color = Settings.screenMode ? "#000" : vector.color;
+    const color = isScreenStyle() ? "#000" : vector.color;
     this.context.fillStyle = color;
     this.context.textBaseline = "bottom";
     this.context.font = `${

+ 4 - 4
src/main.ts

@@ -1,9 +1,9 @@
 import VConsole from "vconsole";
 import { useParams } from "@/hook/useParams";
 
-if (useParams().console === "true") {
-  new VConsole();
-}
+// if (useParams().console === "true") {
+new VConsole();
+// }
 
 import "@/assets/theme.editor.scss";
 import "@/assets/public.scss";
@@ -15,7 +15,7 @@ import { router, setupRouter } from "@/router";
 import appConfig from "./appConfig";
 import { currentApp, setCurrentApp } from "@/store/app";
 import App from "./main.vue";
-import 'swiper/swiper.min.css';
+import "swiper/swiper.min.css";
 const app = createApp(App);
 
 setCurrentApp(appConfig);

+ 1 - 0
src/views/graphic/geos/roadEdge.vue

@@ -67,6 +67,7 @@ const lineTypeMenu = reactive([
   {
     key: VectorStyle.RoadSide,
     icon: "stone",
+    hide: vector.value.geoType === "CurveRoadEdge",
     text: "路缘线",
     onClick: () => {
       clickHandlerFactory(VectorStyle.RoadSide)();

+ 5 - 0
src/views/scene/container.vue

@@ -54,6 +54,11 @@ onMounted(async () => {
 
   watchEffect(() => {
     if (sceneSeting.value) {
+      console.log("setSceneCropSetting", {
+        top: { value: sceneSeting.value.top },
+        rotate: { value: sceneSeting.value.rotate },
+        scale: { value: sceneSeting.value.scale },
+      });
       sdk.scene.setSceneCropSetting({
         top: { value: sceneSeting.value.top },
         rotate: { value: sceneSeting.value.rotate },

+ 2 - 2
src/views/scene/covers/basePoints.vue

@@ -33,7 +33,6 @@ import ActionsPanel from "@/views/scene/covers/actions.vue";
 import { customMap, useSDK } from "@/hook";
 import ActionMenus from "@/components/group-button/index.vue";
 
-
 const activeActionMenus = [
   {
     key: "delete",
@@ -53,7 +52,7 @@ const activeActionMenus = [
 ];
 </script>
 
-<style scoped>
+<style scoped lang="scss">
 .action-menus {
   position: absolute;
   bottom: var(--boundMargin);
@@ -61,6 +60,7 @@ const activeActionMenus = [
   transform: translateX(-50%);
   display: flex;
   z-index: 2;
+
   .menus {
     position: static;
   }

+ 8 - 1
src/views/scene/covers/range.vue

@@ -47,7 +47,7 @@
 import { Pos, SDK } from "@/sdk";
 import { computed, onMounted, onUnmounted, ref, watchEffect } from "vue";
 import { sceneSeting } from "@/store/sceneSeting";
-import { useSDK } from "@/hook";
+import { disabledMap, modeDisabled, useSDK } from "@/hook";
 
 const props = defineProps<{ rangeKey: string }>();
 const topSetting = useSDK().scene.getSceneCropSetting().top;
@@ -82,17 +82,24 @@ watchEffect((onCleanup) => {
   if (props.rangeKey && cropApi.value) {
     const name = `${props.rangeKey[0].toUpperCase()}${props.rangeKey.substring(1)}`;
     cropApi.value[`enterSet${name}`]();
+    console.log(`enterSet${name}`)
     onCleanup(() => {
       cropApi.value[`leaveSet${name}`]();
+      console.log(`leaveSet${name}`)
     });
   }
 });
 
+let pop;
 onMounted(() => {
+  console.log("enterCropSetting")
   cropApi.value = useSDK().scene.enterCropSetting();
+  pop = modeDisabled.push(ref(true));
 });
 onUnmounted(() => {
+  console.log("quit")
   cropApi.value && cropApi.value.quit();
+  modeDisabled.pop();
 });
 </script>