From 94cb5196f4eecdc6102ef3da74087b1a8a58bc99 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 23 三月 2026 13:09:23 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/constants.js | 49 +++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/zy-acs-flow/src/map/constants.js b/zy-acs-flow/src/map/constants.js
index 6875e15..032b4f4 100644
--- a/zy-acs-flow/src/map/constants.js
+++ b/zy-acs-flow/src/map/constants.js
@@ -1,11 +1,24 @@
-export const MAP_DEFAULT_ROTATION = 180;
-
-export const AGV_ANGLE_OFFSET_VAL = 90;
-
-export const MAP_MIRROR = true;
+export const MAP_DEFAULT_ROTATION = 0;
export const ANIMATE_DURING_TIME = 300;
+
+export let AGV_ANGLE_OFFSET_VAL = 0;
+
+export let MAP_MIRROR = false;
+
+export const setMapPreferences = (preferences = {}) => {
+ if (preferences == null || typeof preferences !== 'object') {
+ return;
+ }
+ const { agvAngleOffsetVal, mapMirror } = preferences;
+ if (typeof agvAngleOffsetVal === 'number' && !isNaN(agvAngleOffsetVal)) {
+ AGV_ANGLE_OFFSET_VAL = agvAngleOffsetVal;
+ }
+ if (typeof mapMirror === 'boolean') {
+ MAP_MIRROR = mapMirror;
+ }
+};
export const MAP_MODE = Object.freeze({
OBSERVER_MODE: "1",
@@ -13,6 +26,25 @@
SETTINGS_MODE: "3",
AREA_MODE: "4",
})
+
+export const MAP_TONES = Object.freeze({
+ light: {
+ canvasBackground: '#f1f2f6',
+ textPrimary: 0x333333,
+ grid: {
+ color: 0x000000,
+ alpha: 0.08,
+ },
+ },
+ dark: {
+ canvasBackground: '#1c222b',
+ textPrimary: 0xcfd6e3,
+ grid: {
+ color: 0x5f6773,
+ alpha: 0.22,
+ },
+ },
+});
export const DEVICE_TYPE = Object.freeze({
SHELF: "SHELF",
@@ -59,7 +91,7 @@
DIRECTION: null,
AGV: 0xb2bec3,
- POINT: 0xdfe6e9,
+ POINT: 0x555a68,
})
export const DEVICE_SELECTED_EFFECT_PADDING = Object.freeze({
@@ -98,3 +130,8 @@
ORDER: 1,
REVERSE_ORDER: 2,
})
+
+export const ROUTE_COLORS = Object.freeze({
+ light: 0x2f68ac,
+ dark: 0x4a84c8,
+});
--
Gitblit v1.9.1