| | |
| | | POINT: 0xCACDCF, |
| | | }) |
| | | |
| | | export const DEVICE_SPRITE_TINT_DARK = Object.freeze({ |
| | | SHELF: 0xdcdde1, |
| | | STATION: null, |
| | | CHARGE: null, |
| | | DIRECTION: null, |
| | | |
| | | AGV: null, |
| | | POINT: 0xf1f2f6, |
| | | }) |
| | | |
| | | export const DEVICE_SELECTED_EFFECT_PADDING = Object.freeze({ |
| | | SHELF: 10, |
| | | STATION: 10, |
| | |
| | | DEVICE_SELECTED_EFFECT_PADDING, |
| | | DEVICE_SELECTED_EFFECT_COLOR, |
| | | POINT_ROUTE_DIRECTION, |
| | | DEVICE_SPRITE_TINT_DARK, |
| | | } from './constants'; |
| | | import { getRouteList } from './http'; |
| | | import PointRoute from "./PointRoute"; |
| | |
| | | |
| | | export function setThemeMode(param) { |
| | | themeMode = param; |
| | | if (mapContainer) { |
| | | // mapContainer.children.forEach(child => { |
| | | // const deviceType = child.data?.type; |
| | | // if (deviceType) { |
| | | // if (themeMode === 'dark') { |
| | | // const tint = DEVICE_SPRITE_TINT_DARK[deviceType] |
| | | // if (tint) { |
| | | // child.tint = tint; |
| | | // } |
| | | // } else { |
| | | // DEVICE_SPRITE_TINT[deviceType] != null && (child.tint = DEVICE_SPRITE_TINT[deviceType]); |
| | | // } |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | default: |
| | | break; |
| | | } |
| | | DEVICE_SPRITE_TINT[deviceType] != null && (sprite.tint = DEVICE_SPRITE_TINT[deviceType]); |
| | | const tintType = themeMode === 'dark' ? DEVICE_SPRITE_TINT_DARK : DEVICE_SPRITE_TINT; |
| | | tintType[deviceType] != null && (sprite.tint = tintType[deviceType]); |
| | | |
| | | if (sprite && deviceType !== DEVICE_TYPE.AGV) { |
| | | sprite.blendMode = PIXI.BLEND_MODES.MULTIPLY; |