修改代码
This commit is contained in:
parent
dd9c8220b1
commit
5e8f1899ff
@ -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: {
|
||||
|
@ -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 })
|
||||
|
@ -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,
|
||||
|
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user