From 5e8f1899ff3927d9d05f4d1af8b2d3b77f5d01a3 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Mon, 5 Aug 2019 09:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/config/skinStyle/chengdu_03.js | 22 +++++++++++----------- src/jmap/shape/StationControl/EArrow.js | 12 ++++++------ src/jmap/shape/StationControl/index.js | 4 ++-- src/jmap/shape/utils/ShapePoints.js | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/jmap/config/skinStyle/chengdu_03.js b/src/jmap/config/skinStyle/chengdu_03.js index f81c4689a..703d4a5f6 100644 --- a/src/jmap/config/skinStyle/chengdu_03.js +++ b/src/jmap/config/skinStyle/chengdu_03.js @@ -13,7 +13,7 @@ class SkinStyle extends defaultStyle { this[deviceType.Section] = { text: { // 区段文字属性 - distance: 2, // 文字离区段距离 + distance: 1, // 文字离区段距离 fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体族类 fontColor: '#FFFFFF', // 字体颜色 @@ -92,8 +92,8 @@ class SkinStyle extends defaultStyle { blueColor: '#0070C0' // 信号灯蓝色 }, route: { - direction: false, // 自动进路方向 - offset: { x: -4, y: 0 }, // 自动进路偏移量 + direction: true, // 自动通过方向 + offset: { x: 4, y: 0}, // 自动通过偏移量 routeColor: '#00FF00' // 自动进路 }, auto: { @@ -105,9 +105,9 @@ class SkinStyle extends defaultStyle { outConflict: '#C00808' // 出车冲突 }, delay: { - direction: true, // 延时解锁方向 - offset: { x: 15, y: -10}, // 延时解锁偏移量 - fontSize: 10, // 延迟解锁字体大小 + direction: false, // 延时解锁方向 + offset: { x: -5, y: 0}, // 延时解锁偏移量 + fontSize: 12, // 延迟解锁字体大小 fontColor: '#C00808' // 延迟解锁颜色 }, @@ -181,7 +181,7 @@ class SkinStyle extends defaultStyle { this[deviceType.StationControl] = { text: { distance: 2, // 灯和文字之间的距离 - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 fontFormat: 'consolas', // 字体格式 fontColor: '#ffffff', // 字体颜色 fontWeight: 'normal', // 字体粗细 @@ -191,7 +191,7 @@ class SkinStyle extends defaultStyle { lamp: { count: 4, // 控制模式的个数 offset: {x: 0, y: 0}, // 偏移量 - radiusR: 4, // 控制模式灯的半径 + radiusR: 6, // 控制模式灯的半径 distance: 36, // 控制模式之间灯之间的距离 grayColor: '#7F7F7F', // 控制模式灰色 greenColor: '#00FF00', // 控制模式绿色 @@ -241,7 +241,7 @@ class SkinStyle extends defaultStyle { this[deviceType.LcControl] = { text: { - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 distance: 5 // 灯跟文字距离 }, lamp: { @@ -252,7 +252,7 @@ class SkinStyle extends defaultStyle { this[deviceType.ZcControl] = { text: { - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 distance: 5 // 灯跟文字距离 }, lamp: { @@ -263,7 +263,7 @@ class SkinStyle extends defaultStyle { this[deviceType.LimitControl] = { text: { - fontSize: 10, // 字体大小 + fontSize: 12, // 字体大小 distance: 5 // 灯跟文字距离 }, lamp: { diff --git a/src/jmap/shape/StationControl/EArrow.js b/src/jmap/shape/StationControl/EArrow.js index 18ad74628..1a86b4888 100644 --- a/src/jmap/shape/StationControl/EArrow.js +++ b/src/jmap/shape/StationControl/EArrow.js @@ -11,7 +11,7 @@ class ESigAuto extends Group { create() { const model = this.model; - this.arrows = new Polygon({ + this.arrow = new Polygon({ zlevel: model.zlevel, z: model.z, shape: { @@ -23,24 +23,24 @@ class ESigAuto extends Group { fill: model.fill } }); - this.add(this.arrows); + this.add(this.arrow); } // 停止动画 animationRecover() { - this.arrows.stopAnimation(false); + this.arrow.stopAnimation(false); } // 箭头颜色 setColor(color) { - this.arrows.setStyle('fill', color); + this.arrow.setStyle('fill', color); } // 箭头闪烁 arrowsAnimation() { const style = this.model.style; - const fill = this.arrows.style.Signal.fill; - this.arrows.animate(true) + const fill = this.arrow.style.Signal.fill; + this.arrow.animate(true) .when(1000, { fill: style.backgroundColor, stroke: style.style.backgroundColor }) .when(2000, { fill: fill, stroke: style.style.Signal.sidelineColor }) .when(3000, { fill: style.style.backgroundColor, stroke: style.style.backgroundColor }) diff --git a/src/jmap/shape/StationControl/index.js b/src/jmap/shape/StationControl/index.js index f0f37d187..dee41cabb 100644 --- a/src/jmap/shape/StationControl/index.js +++ b/src/jmap/shape/StationControl/index.js @@ -4,7 +4,7 @@ import Group from 'zrender/src/container/Group'; import ESingleControl from './ESingleControl'; // 单个信号灯 (私有) import EArrow from './EArrow'; -import { arrows } from '../utils/ShapePoints'; +import { arrow } from '../utils/ShapePoints'; import EMouse from './EMouse'; /** 控制模式*/ @@ -77,7 +77,7 @@ export default class StationControl extends Group { }); // 箭头 if (this.style.StationControl.arrow.show) { - const point = arrows(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8); + const point = arrow(this.model.position.x, this.model.position.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8); this.arrowsControl = new EArrow({ zlevel: this.zlevel, z: this.z, diff --git a/src/jmap/shape/utils/ShapePoints.js b/src/jmap/shape/utils/ShapePoints.js index 2d3c32c64..ffba459d6 100644 --- a/src/jmap/shape/utils/ShapePoints.js +++ b/src/jmap/shape/utils/ShapePoints.js @@ -1,7 +1,7 @@ import Path from 'zrender/src/graphic/Path'; /** 指向箭头坐标*/ -export function arrows(modelX, modelY, length, radius) { +export function arrow(modelX, modelY, length, radius) { return [ [modelX - length, modelY], [modelX - length + radius / 1.5, modelY - radius / 1.2],