Merge branch 'master' of https://git.cloud.tencent.com/joylink/jl-nclient
# Conflicts: # src/jmap/config/skinStyle/chengdu_03.js
This commit is contained in:
commit
af0fd392d1
@ -1,8 +1,8 @@
|
||||
const mapDeviceStyle = {
|
||||
// '01': 'chengdu_04',
|
||||
'02': 'fuzhou_01',
|
||||
// '03': 'bejing_01',
|
||||
'03': 'chengdu_03',
|
||||
'03': 'bejing_01',
|
||||
// '03': 'chengdu_03',
|
||||
'05': 'batong_01' // 暂时没有画北京八通线
|
||||
};
|
||||
|
||||
|
@ -5,376 +5,10 @@ class SkinStyle extends defaultStyle {
|
||||
constructor() {
|
||||
super();
|
||||
this[deviceType.Link] = {
|
||||
/** line 颜色*/
|
||||
lineWidthColor: '#FFFFFF',
|
||||
/** link 宽度*/
|
||||
linkWidth: 4.4,
|
||||
/** link 线条颜色*/
|
||||
linkColor: '#3F3F3F',
|
||||
/** link 字体颜色*/
|
||||
linkTextColor: '#FFFFFF'
|
||||
};
|
||||
this[deviceType.Section] = {
|
||||
sectionTextPosition: 0, // 区段名称位置 1 上行 -1 下面 0 默认
|
||||
/** 区段 宽度*/
|
||||
sectionWidth: 5,
|
||||
/** 区段宽超出宽度*/
|
||||
sectionBeyondWidth: 1,
|
||||
/** 计轴 半径*/
|
||||
sectionAxleR: 3,
|
||||
/** 计轴和区段之间的距离*/
|
||||
sectionAxleDistance: 5,
|
||||
/** 限速线的宽度*/
|
||||
sectionSpeedLimitLinewidth: 1,
|
||||
/** 限速线距离区段距离*/
|
||||
sectionSpeedLimitDistance: 5,
|
||||
/** 分隔符宽度*/
|
||||
sectionSeparatorWidth: 1.2,
|
||||
sectionEndSeparatorWidth: 1.2, // 尽头分隔符宽度
|
||||
sectionEndSeparatorStroke: '#7F7F7F', // 尽头分隔符颜色
|
||||
/** 区段侵入颜色*/
|
||||
sectionInvadeColor: '#EF0C08',
|
||||
/** 限速线颜色*/
|
||||
sectionSpeedLimitColor: '#FFFF00',
|
||||
/** 逻辑区段颜色*/
|
||||
sectionLogicalBackgroundColor: '#FFFF00',
|
||||
/** 区段计轴颜色*/
|
||||
sectionAxleColor: '#FFFFFF',
|
||||
/** 区段边界符颜色*/
|
||||
sectionSeparatorColor: '#C0C0C0',
|
||||
/** 区段空闲颜色*/
|
||||
sectionSpareColor: '#0000FF',
|
||||
/** 逻辑区段名称颜色*/
|
||||
sectionLogicalTextColor: '#C0C0C0',
|
||||
/** 区段通信车占用颜色**/
|
||||
sectionCommunicationOccupiedColor: '#FF329A',
|
||||
/** 区段非通讯车占用颜色*/
|
||||
sectionUnCommunicationOccupiedColor: '#FE0000',
|
||||
/** 区段路由锁定颜色*/
|
||||
sectionRouteLockColor: '#FFFFFF',
|
||||
/** 区段故障锁定颜色*/
|
||||
sectionFaultLockColor: '#9B4A0A',
|
||||
/** 区段未定义颜色*/
|
||||
sectionUndefinedColor: '#0071C1',
|
||||
/** 保护区段锁闭*/
|
||||
sectionProtectionSectionLockedColor: '#FEFF00',
|
||||
/** 区段计轴预复位*/
|
||||
sectionAxleResetColor: '#00FFFF',
|
||||
/** 区段封锁颜色*/
|
||||
sectionBlockColor: '#800080',
|
||||
/** 区段atc切除颜色*/
|
||||
sectionAtcExcisionColor: '#A0522D',
|
||||
/** 区段ats切除颜色*/
|
||||
sectionAtsExcisionColor: '#A0522D',
|
||||
/** 区段延时释放颜色*/
|
||||
sectionTimeReleaseColor: '#3F3F3F',
|
||||
/** 区段保护锁闭*/
|
||||
sectionProtectiveLockColor: '#FFFF00',
|
||||
/** 区段保护延时解锁*/
|
||||
sectionProtectiveTimeReleaseColor: '#0071C1',
|
||||
/** 计轴失效*/
|
||||
sectionAxleFailure: '#E6A23C' // #FFFF00
|
||||
};
|
||||
this[deviceType.Signal] = {
|
||||
/** 信号机宽度 */
|
||||
signalR: 5,
|
||||
/** 自动信号宽度*/
|
||||
signalAutoWidth: 6,
|
||||
/** 延迟解锁字体大小*/
|
||||
signalDelayTextFontSize: 10,
|
||||
/** 信号机名称字体大小*/
|
||||
signalTextFontSize: 12,
|
||||
/** 灯柱宽度*/
|
||||
signalLampStandardWidth: 1.2,
|
||||
/** 设备距离区段的距离*/
|
||||
signalDistance: 19,
|
||||
/** 信号灯按钮距离区段的距离*/
|
||||
signalButtonDistance: 5,
|
||||
/** 自动进路方向*/
|
||||
signalSigRouteDirection: false,
|
||||
/** 自动进路偏移量*/
|
||||
signalSigRouteOffset: { x: 4, y: -2 },
|
||||
/** 自动通过方向*/
|
||||
signalSigPassDirection: true,
|
||||
/** 自动通过偏移量*/
|
||||
signalSigPassOffset: { x: 4, y: 0},
|
||||
/** 延时解锁方向*/
|
||||
signalSigDelayDirection: false,
|
||||
/** 延时解锁偏移量*/
|
||||
signalSigDelayOffset: { x: 0, y: -5},
|
||||
/** 信号灯按钮边线*/
|
||||
signalButtonDashColor: '#FFFFFF',
|
||||
/** 信号灯按钮颜色*/
|
||||
signalButtonColor: 'darkgreen',
|
||||
/** 信号灯按钮闪烁颜色*/
|
||||
signalButtonLightenColor: '#E4EF50',
|
||||
/** 信号灯字体颜色*/
|
||||
signalTextRed: '#EF0C08',
|
||||
/** 信号机字体绿色*/
|
||||
signalTextGreen: '#4DD43F',
|
||||
/** 信号灯灯柱颜色*/
|
||||
signalLampStandardColor: '#C0C0C0', // #3E44BE,
|
||||
/** 信号灯锁闭*/
|
||||
signalBlockColor: '#EF0C08',
|
||||
/** 信号灯灰色*/
|
||||
signalLampGrayColor: '#808080',
|
||||
/** 信号灯红色*/
|
||||
signalLampRedColor: '#EF0C08',
|
||||
/** 信号灯绿色*/
|
||||
signalLampGreenColor: '#4DD43F',
|
||||
/** 信号灯黄色*/
|
||||
signalLampYellowColor: '#E4EF50',
|
||||
/** 信号灯白色*/
|
||||
signalLampWhiteColor: '#FFFFFF',
|
||||
/** 信号灯蓝色*/
|
||||
signalLampBlueColor: '#3E44BE'
|
||||
};
|
||||
this[deviceType.StationStand] = {
|
||||
/** 站台和屏蔽门之间的距离*/
|
||||
standDistance: 9,
|
||||
/** 站台屏蔽门高度*/
|
||||
standSafeHeight: 1.6,
|
||||
/** 站台首端字体大小*/
|
||||
standHeadFontSize: 8,
|
||||
/** 站台默认字体大小*/
|
||||
standTextFontSize: 8,
|
||||
/** 站台紧急关闭半径*/
|
||||
standEmergentR: 4,
|
||||
/** 站台紧急关闭偏移量*/
|
||||
standEmergentOffset: {x: 0, y: 0},
|
||||
/** 扣车方向*/
|
||||
standDetainDirection: 1,
|
||||
/** 扣车偏移量*/
|
||||
standDetainOffset: {x: -8, y: 13},
|
||||
/** 运行时间方向*/
|
||||
standTimeDirection: 1,
|
||||
/** 运行时间偏移量*/
|
||||
standTimeOffset: {x: -8, y: 3},
|
||||
/** 运行等级方向*/
|
||||
standLevelDirection: 1,
|
||||
/** 运行等级偏移量*/
|
||||
standLevelOffset: {x: -8, y: 22},
|
||||
/** 折返方向*/
|
||||
standReentryDirection: 0,
|
||||
/** 折返偏移量*/
|
||||
standReentryOffset: {x: -16, y: 18},
|
||||
/** 扣车显示内容*/
|
||||
standDetainText: 'H',
|
||||
/** 站台无人折返*/
|
||||
standNoHumanReentryColor: '#0F16DA',
|
||||
/** 站台自动换端*/
|
||||
standAutoChangeEndsColor: '#0BF400',
|
||||
/** 站台空闲颜色*/
|
||||
standSpareColor: '#ffffff',
|
||||
/** 站台列车停站颜色*/
|
||||
standStopColor: '#FEFE00',
|
||||
/** 站台跳停颜色*/
|
||||
standJumpStopColor: '#9A99FF',
|
||||
/** 站台指定列车跳停颜色*/
|
||||
standDesignatedJumpStopColor: 'lightSkyBlue',
|
||||
/** 站台紧急关闭颜色*/
|
||||
standEmergentCloseColor: '#F61107',
|
||||
/** 停站时间字体颜色*/
|
||||
standTimeTextColor: '#FFFFFF',
|
||||
/** 停站等级字体颜色*/
|
||||
standLevelTextColor: '#FFFFFF',
|
||||
/** 车站扣车颜色*/
|
||||
standDetainTrainColor: '#E4EF50',
|
||||
/** 中心扣车颜色*/
|
||||
standCenterDetainTrainColor: '#FFFFFF',
|
||||
/** 车站+中心扣车颜色*/
|
||||
standAndCenterDetainTrainColor: '#F61107',
|
||||
/** 屏蔽门默认颜色*/
|
||||
standDoorDefaultColor: '#00FF00',
|
||||
/** 屏蔽门切除颜色*/
|
||||
standSplitDoorColor: '#F61107',
|
||||
/** 车站扣除文字颜色*/
|
||||
standDetainTrainTextColor: '#E4EF50',
|
||||
/** 计数器字体颜色*/
|
||||
stationCounterTextColor: '#FFFFFF',
|
||||
/** 计数器边框颜色*/
|
||||
stationCounterBorderColor: '#E4EF50',
|
||||
/** 延迟解锁倒计时和设备文字之间的距离*/
|
||||
stationDelayUnlockDistance: 3,
|
||||
/** 延时解锁字体颜色*/
|
||||
stationDelayUnlockTextColor: '#FFFFFF',
|
||||
/** 延迟解锁边框颜色*/
|
||||
stationDelayUnlockBorderColor: '#FFFFFF'
|
||||
};
|
||||
this[deviceType.StationControl] = {
|
||||
singleControlNum: 3, // 灯数
|
||||
stationOffset: {x: 20, y: 0}, // 控制模式灯位置偏移量
|
||||
arrowsShow: false, // 控制模式箭头显隐
|
||||
/** 控制模式字体大小*/
|
||||
stationControlTextSize: 12,
|
||||
/** 控制模式灯的半径 */
|
||||
stationControlmodeR: 5,
|
||||
/** 控制模式之间灯之间的距离*/
|
||||
stationControlDistance: 44,
|
||||
/** 控制模式灰色*/
|
||||
stationControlGrayColor: '#74747C',
|
||||
/** 控制模式绿色*/
|
||||
stationControlGreenColor: '#4DD43F',
|
||||
/** 控制模式红色*/
|
||||
stationControlRedColor: '#EF0C08',
|
||||
/** 控制模式黄色*/
|
||||
stationControlYellowColor: '#E4EF50'
|
||||
};
|
||||
this[deviceType.Station] = {
|
||||
kilometerPosition: 'down' // 公里标位置
|
||||
};
|
||||
this[deviceType.Switch] = {
|
||||
// 道岔字体颜色
|
||||
switchTextColor: '#FF00C0',
|
||||
/** 道岔单边长度 */
|
||||
switchLen: 6,
|
||||
/** 道岔名称与区段距离*/
|
||||
switchNameDistance: 2,
|
||||
/** 道岔边框颜色*/
|
||||
switchTextBorderColor: '#FE0000',
|
||||
/** 道岔失去颜色*/
|
||||
switchTextLossColor: '#FFFFFF',
|
||||
/** 道岔定位颜色*/
|
||||
switchTextLocateColor: '#00FF00',
|
||||
/** 道岔反位颜色*/
|
||||
switchInversionColor: '#9C9D09',
|
||||
/** 道岔单锁颜色*/
|
||||
switchMonolockColor: '#870E10',
|
||||
/** 列车服务号偏移 */
|
||||
trainServerOffset: { x: -1, y: 1},
|
||||
/** 列车车次号偏移 */
|
||||
trainTargetOffset: { x: -1, y: 1}
|
||||
};
|
||||
this[deviceType.Train] = {
|
||||
/** 车身line宽 */
|
||||
trainBodyLineWidth: 0,
|
||||
/** 车身鼠标悬浮事件 */
|
||||
trainBodyOnMouseOver: {train: true, textTrainNumber: true, textTrainServer: true, textTrainTarget: true, textTrainTargetNumber: true},
|
||||
/** 车身鼠标移出事件 */
|
||||
trainBodyOnMouseOut: {train: true, textTrainNumber: true, textTrainServer: true, textTrainTarget: true, textTrainTargetNumber: true},
|
||||
/** 目的地码前缀*/
|
||||
targetCodePrefix: '000',
|
||||
/** 默认目的地码 */
|
||||
defaultTargetCode: 'AAA',
|
||||
/** 服务号(表号)前缀 */
|
||||
serviceNumberPrefix: '00',
|
||||
/** 默认服务号(表号) */
|
||||
defaultServiceNumber: 'BB',
|
||||
/** 车次号前缀 */
|
||||
tripNumberPrefix: '0000',
|
||||
/** 默认车次号1 */
|
||||
defaultDirectionCode: 'D',
|
||||
/** 默认车次号2 */
|
||||
defaultTripNumber: 'CCC',
|
||||
/** 车组号前缀 */
|
||||
groupNumberPrefix: '000',
|
||||
/** 默认车组号 */
|
||||
defaultGroupNumber: 'EEE',
|
||||
/** 列车车头比车身高出的长度,上下相比车体伸出去的边框*/
|
||||
trainMoreLength: 1,
|
||||
/** 列车车头三角坐标1偏移量 */
|
||||
trainHeadTriangleFirst: { x: 0, y: 0},
|
||||
/** 列车车头三角坐标2偏移量 */
|
||||
trainHeadTriangleSecond: { x: 4, y: 8.5},
|
||||
/** 列车车头三角坐标3偏移量 */
|
||||
trainHeadTriangleThird: { x: 0, y: 15},
|
||||
/** 列车高度*/
|
||||
trainHeight: 17,
|
||||
/** 列车和车头之间的间距*/
|
||||
trainHeadDistance: 2,
|
||||
/** 列车车头矩形高度 */
|
||||
trainHeadRectHeight: 15,
|
||||
/** 列车长度*/
|
||||
trainWidth: 76,
|
||||
/** 列车竖杠的宽度*/
|
||||
trainConntWidth: 4,
|
||||
/** 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 */
|
||||
changeTrainWidth: true,
|
||||
/** 是否根据nameFormat去动态加载车组号、服务号、车次号、目的地码 */
|
||||
dynamicLoadingDisplay: true,
|
||||
/** 特殊列车类型需设置显示格式 */
|
||||
specialTrainType: [],
|
||||
/** 两边间隔 */
|
||||
lrPadding: 1,
|
||||
/** 上边距离 */
|
||||
upPadding: 1,
|
||||
/** 列车字号*/
|
||||
trainTextFontSize: 15,
|
||||
/** 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除 */
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#3265FF'},
|
||||
{status: '04', showColor: '#9B4A09'},
|
||||
{status: '05', showColor: '#EF0C08'},
|
||||
{status: '06', showColor: '#FFFFFF'},
|
||||
{status: '07', showColor: '#FFFF00'}
|
||||
],
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: '宋体',
|
||||
/** 列车HDSA字号*/
|
||||
trainHSDATextFontSize: 8,
|
||||
/** 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'} */
|
||||
serverNoType: [],
|
||||
/** 运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/
|
||||
directionType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: false },
|
||||
{type: '02', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: true },
|
||||
{type: '03', lineLShow: false, lineRShow: false, arrowLShow: true, arrowRShow: false }
|
||||
],
|
||||
/** 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 */
|
||||
directionStopType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false},
|
||||
{type: '02', lineLShow: false, lineRShow: true},
|
||||
{type: '03', lineLShow: true, lineRShow: false}
|
||||
],
|
||||
/** 列车运行模式对应车头颜色 01信号中断 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM
|
||||
* 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM*/
|
||||
runModeStatus: [
|
||||
{status: '01', trainLColor: '#EF0C08', trainRColor: '#EF0C08'},
|
||||
{status: '02', trainLColor: '#00FF00', trainRColor: '#00FF00'},
|
||||
{status: '03', trainLColor: '#FFFF00', trainRColor: '#FFFF00'},
|
||||
{status: '04', trainLColor: '#EA700D', trainRColor: '#EA700D'},
|
||||
{status: '05', trainLColor: '#A0522D', trainRColor: '#A0522D'}
|
||||
],
|
||||
/** 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}, */
|
||||
runControlStatus: [],
|
||||
/** 设置车门状态类型 eg:{status: '01', dShow: false}, */
|
||||
doorStatus: [],
|
||||
/** 设置通信状态 eg:{status: '01', trainColor:'#725A64'}, */
|
||||
communicationStatus: [],
|
||||
/** 设置报警状态 eg:{status: '01', aShow: false}, */
|
||||
alarmStatus: [],
|
||||
/** 列车车头矩形填充颜色 */
|
||||
trainHeadFillColor: '#EF0C08',
|
||||
/** 列车车身填充颜色 */
|
||||
trainBodyFillColor: '#000000',
|
||||
/** 列车服务号偏移 */
|
||||
trainServerOffset: { x: -1, y: 1},
|
||||
/** 列车车次号偏移 */
|
||||
trainTargetOffset: { x: -1, y: 1},
|
||||
/** 列车显示格式 */
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber',
|
||||
/** 字体大小 */
|
||||
nameFontSize: 10,
|
||||
/** 目的地码文字显示位置 */
|
||||
trainTargetTextAlign: 'left',
|
||||
/** 是否需创建textHSDA对象 */
|
||||
haveTextHSDA: false,
|
||||
/** 是否需创建arrowText对象 */
|
||||
haveArrowText: true,
|
||||
/** 是否需创建trainBorder对象 */
|
||||
haveTrainBorder: false
|
||||
};
|
||||
this[deviceType.TrainWindow] = {
|
||||
/** 车次窗颜色*/
|
||||
trainWindowColor: '#4DD43F',
|
||||
/** 车次窗虚线间隔 */
|
||||
trainWindowLineDash: null,
|
||||
/** 车次窗线宽 */
|
||||
trainWindowLineWidth: 1.5,
|
||||
/** 车次窗矩形圆滑程度 */
|
||||
trainWindowSmooth: 0
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -5,15 +5,12 @@ class SkinStyle extends defaultStyle {
|
||||
constructor() {
|
||||
super();
|
||||
this[deviceType.Link] = {
|
||||
/** line 颜色*/
|
||||
lineWidthColor: '#FFFFFF',
|
||||
/** link 宽度*/
|
||||
linkWidth: 4.4,
|
||||
/** link 线条颜色*/
|
||||
linkColor: '#3F3F3F',
|
||||
/** link 字体颜色*/
|
||||
linkTextColor: '#FFFFFF'
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
};
|
||||
|
||||
this[deviceType.Section] = {
|
||||
text: { // 区段文字属性
|
||||
fontSize: 10, // 字体大小
|
||||
@ -68,91 +65,57 @@ class SkinStyle extends defaultStyle {
|
||||
color: '#7F7F7F' // 区段边界符颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
/** 设备距离区段的距离*/
|
||||
signalDistance: 0,
|
||||
signalDistance: 0, // 设备距离区段的距离
|
||||
post: {
|
||||
/** 信号灯灯柱颜色*/
|
||||
signalLampStandardColor: '#5578B6',
|
||||
signalLampStandardWidth: 1.5
|
||||
standardColor: '#5578B6', // 灯灯柱颜色
|
||||
standardWidth: 1.5 // 灯柱宽度
|
||||
},
|
||||
text: {
|
||||
/** 文字和灯杆的距离*/
|
||||
distance: 3,
|
||||
/** 是否禁止旋转*/
|
||||
isNoRotation: true,
|
||||
/** 信号字体对其方式*/
|
||||
isAlignCenter: false,
|
||||
/** 信号机名称字体大小*/
|
||||
signalTextFontSize: 10,
|
||||
/** 信号灯字体默认色*/
|
||||
signalDefaultTextColor: '#C0C0C0',
|
||||
/** 信号灯字体锁定颜色*/
|
||||
signalTextBlockColor: '#EF0C08',
|
||||
/** 信号字体*/
|
||||
signalTextblock: '#00FF00'
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 10, // 信号机名称字体大小
|
||||
defaultColor: '#C0C0C0', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
/** 禁止线宽度*/
|
||||
signalStopWidth: 2,
|
||||
/** 信号灯边框线宽度*/
|
||||
signalBorderWidth: 1,
|
||||
/** 信号灯边框线颜色*/
|
||||
signalBorderColor: '#3149C3',
|
||||
/** 信号机宽度 */
|
||||
signalR: 5,
|
||||
/** 信号灯锁闭*/
|
||||
signalBlockColor: '#EF0C08',
|
||||
/** 信号灯灰色*/
|
||||
signalLampGrayColor: '#7F7F7F',
|
||||
/** 信号灯红色*/
|
||||
signalLampRedColor: '#FF0000',
|
||||
/** 信号灯绿色*/
|
||||
signalLampGreenColor: '#00FF00',
|
||||
/** 信号灯黄色*/
|
||||
signalLampYellowColor: '#FFFF00',
|
||||
/** 信号灯白色*/
|
||||
signalLampWhiteColor: '#FFFFFF',
|
||||
/** 信号灯蓝色*/
|
||||
signalLampBlueColor: '#0070C0'
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 1, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 5, // 信号机宽度
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
},
|
||||
route: {
|
||||
/** 自动进路方向*/
|
||||
signalRouteDirection: false,
|
||||
/** 自动进路偏移量*/
|
||||
signalRouteOffset: { x: 4, y: -2 },
|
||||
/** 自动进路*/
|
||||
signalRouteColor: '#00FF00'
|
||||
direction: false, // 自动进路方向
|
||||
offset: { x: 4, y: -2 }, // 自动进路偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
},
|
||||
auto: {
|
||||
/** 自动通过方向*/
|
||||
signalAutoDirection: true,
|
||||
/** 自动通过偏移量*/
|
||||
signalAutoOffset: { x: 4, y: 0},
|
||||
/** 自动进路*/
|
||||
signalAutoRoute: '#00FF00',
|
||||
/** 自动触发*/
|
||||
signalAutoTrigger: '#FFFF00'
|
||||
direction: true, // 自动通过方向
|
||||
offset: { x: 4, y: 0}, // 自动通过偏移量
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00' // 自动触发
|
||||
},
|
||||
delay: {
|
||||
/** 延迟解锁字体大小*/
|
||||
signalDelayTextFontSize: 9,
|
||||
/** 延时解锁方向*/
|
||||
signalDelayDirection: false,
|
||||
/** 延时解锁偏移量*/
|
||||
signalDelayOffset: { x: 0, y: -5},
|
||||
/** 延迟解锁颜色*/
|
||||
signalDelayTextColor: '#FF0000'
|
||||
direction: false, // 延时解锁方向
|
||||
offset: { x: 0, y: -5}, // 延时解锁偏移量
|
||||
fontSize: 9, // 延迟解锁字体大小
|
||||
fontColor: '#FF0000' // 延迟解锁颜色
|
||||
},
|
||||
button: {
|
||||
/** 信号灯按钮距离区段的距离*/
|
||||
signalButtonDistance: 5,
|
||||
/** 信号灯按钮边线*/
|
||||
signalButtonDashColor: '#FFFFFF',
|
||||
/** 信号灯按钮颜色*/
|
||||
signalButtonColor: 'darkgreen',
|
||||
/** 信号灯按钮闪烁颜色*/
|
||||
signalButtonLightenColor: '#E4EF50'
|
||||
distance: 5, // 信号灯按钮距离区段的距离
|
||||
borderDashColor: '#FFFFFF', // 信号灯按钮边线
|
||||
buttonColor: 'darkgreen', // 信号灯按钮颜色
|
||||
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
borderLineColor: '#FFFFFF',
|
||||
@ -188,7 +151,7 @@ class SkinStyle extends defaultStyle {
|
||||
direction: 0, // 折返方向
|
||||
offset: {x: -16, y: 18}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
AutoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
@ -217,32 +180,28 @@ class SkinStyle extends defaultStyle {
|
||||
|
||||
this[deviceType.StationControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#ffffff',
|
||||
fontWeight: 'normal',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
fontSize: 10, // 控制模式字体大小
|
||||
fontFormat: 'consolas', // 控制模式字体格式
|
||||
fontColor: '#ffffff', // 控制模式字体颜色
|
||||
fontWeight: 'normal', // 控制模式字体粗细
|
||||
textAlign: 'middle', // 控制模式水平对齐
|
||||
textVerticalAlign: 'top' // 控制模式垂直对齐
|
||||
},
|
||||
singleControlNum: 3,
|
||||
stationOffset: { x: 20, y: 0 },
|
||||
arrowsShow: false, // 控制模式箭头显隐
|
||||
/** 控制模式字体大小*/
|
||||
stationControlTextSize: 10,
|
||||
/** 控制模式灯的半径 */
|
||||
stationControlmodeR: 6,
|
||||
/** 控制模式之间灯之间的距离*/
|
||||
stationControlDistance: 36,
|
||||
/** 控制模式灰色*/
|
||||
stationControlGrayColor: '#7F7F7F',
|
||||
/** 控制模式绿色*/
|
||||
stationControlGreenColor: '#00FF00',
|
||||
/** 控制模式红色*/
|
||||
stationControlRedColor: '#FF0000',
|
||||
/** 控制模式黄色*/
|
||||
stationControlYellowColor: '#FFFF00',
|
||||
/** 鼠标悬浮样式 */
|
||||
mouseOverStyle: {
|
||||
lamp: {
|
||||
count: 3, // 控制模式灯个数
|
||||
offset: { x: 20, y: 0 }, // 偏移量
|
||||
radiusR: 6, // 控制模式灯的半径
|
||||
distance: 36, // 控制模式之间灯之间的距离
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00' // 控制模式黄色
|
||||
|
||||
},
|
||||
arrow: {
|
||||
show: false // 控制模式箭头显隐
|
||||
},
|
||||
mouseOverStyle: { // 鼠标悬浮样式
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#FFF000',
|
||||
@ -257,39 +216,39 @@ class SkinStyle extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
mouseOverStyle: {
|
||||
borderBackgroundColor: '#22DFDF',
|
||||
borderColor: '#fff',
|
||||
textShadowColor: '#22DFDF'
|
||||
},
|
||||
text: {
|
||||
/** 道岔名称与区段距离*/
|
||||
switchNameDistance: 2,
|
||||
distance: 2,
|
||||
/** 道岔边框颜色*/
|
||||
switchTextBorderColor: '#FE0000',
|
||||
borderColor: '#FE0000',
|
||||
/** 道岔失去颜色*/
|
||||
switchTextLossColor: '#FFFFFF',
|
||||
lossColor: '#FFFFFF',
|
||||
/** 道岔定位颜色*/
|
||||
switchTextLocateColor: '#00FF00',
|
||||
locateColor: '#00FF00',
|
||||
/** 道岔反位颜色*/
|
||||
switchInversionColor: '#9C9D09',
|
||||
inversionColor: '#9C9D09',
|
||||
/** 道岔单锁颜色*/
|
||||
switchMonolockColor: '#870E10'
|
||||
monolockColor: '#870E10'
|
||||
},
|
||||
core: {
|
||||
/** 道岔单边长度 */
|
||||
switchLen: 6
|
||||
legnth: 6
|
||||
},
|
||||
mouseOverStyle: {
|
||||
borderBackgroundColor: '#22DFDF', // 边框背景色
|
||||
borderColor: '#fff', // 边框颜色
|
||||
textShadowColor: '#22DFDF' // 字体阴影颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontSize: 10, // 灯字体大小
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#FFFF00'
|
||||
radiusR: 6, // 灯大小
|
||||
controlColor: '#FFFF00' // 灯颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
fontSize: 10,
|
||||
@ -302,14 +261,15 @@ class SkinStyle extends defaultStyle {
|
||||
textColor: '#000000'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontSize: 10, // 字体大小
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#00FF00'
|
||||
radiusR: 6, // 灯大小
|
||||
controlColor: '#00FF00' // 灯颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
fontSize: 10,
|
||||
@ -322,14 +282,15 @@ class SkinStyle extends defaultStyle {
|
||||
textColor: '#000000'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontSize: 10, // 字体大小
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#ECE9D8'
|
||||
radiusR: 6, // 灯大小
|
||||
controlColor: '#ECE9D8' // 灯颜色
|
||||
},
|
||||
mouseOverStyle: {
|
||||
fontSize: 10,
|
||||
@ -342,6 +303,18 @@ class SkinStyle extends defaultStyle {
|
||||
arcColor: '#00FFFF'
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF' // 线条颜色
|
||||
};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
trainWindowColor: '#FFF', // 车次窗颜色
|
||||
lineDash: [3, 3], // 车次窗虚线间隔
|
||||
trainWindowLineWidth: 1, // 车次窗线宽
|
||||
trainWindowSmooth: 0.01 // 车次窗矩形圆滑程度
|
||||
};
|
||||
|
||||
this[deviceType.Train] = {
|
||||
/** 车身line宽 */
|
||||
trainBodyLineWidth: 0.1,
|
||||
@ -480,19 +453,6 @@ class SkinStyle extends defaultStyle {
|
||||
/** 目的地码文字显示位置 */
|
||||
trainTargetTextAlign: 'right'
|
||||
};
|
||||
this[deviceType.TrainWindow] = {
|
||||
/** 车次窗颜色*/
|
||||
trainWindowColor: '#FFF',
|
||||
/** 车次窗虚线间隔 */
|
||||
lineDash: [3, 3],
|
||||
/** 车次窗线宽 */
|
||||
trainWindowLineWidth: 1,
|
||||
/** 车次窗矩形圆滑程度 */
|
||||
trainWindowSmooth: 0.01
|
||||
};
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,18 +5,14 @@ class SkinStyle extends defaultStyle {
|
||||
constructor() {
|
||||
super();
|
||||
this[deviceType.Link] = {
|
||||
/** line 颜色*/
|
||||
lineWidthColor: '#FFFFFF',
|
||||
/** link 宽度*/
|
||||
linkWidth: 4.4,
|
||||
/** link 线条颜色*/
|
||||
linkColor: '#3F3F3F',
|
||||
/** link 字体颜色*/
|
||||
linkTextColor: '#FFFFFF'
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
};
|
||||
this[deviceType.Section] = {
|
||||
text: { // 区段文字属性
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 12, // 字体大小
|
||||
fontFormat: 'consolas', // 字体族类
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
@ -63,96 +59,63 @@ class SkinStyle extends defaultStyle {
|
||||
color: '#FFFFFF' // 区段边界符颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
/** 设备距离区段的距离*/
|
||||
signalDistance: 10,
|
||||
signalDistance: 10, // 设备距离区段的距离
|
||||
post: {
|
||||
signalLampStandardColor: '#FFFFFF',
|
||||
signalLampStandardWidth: 2
|
||||
standardColor: '#FFFFFF', // 灯柱颜色
|
||||
standardWidth: 2 // 灯柱宽度
|
||||
},
|
||||
text: {
|
||||
/** 文字和灯杆的距离*/
|
||||
distance: 0,
|
||||
/** 是否禁止旋转*/
|
||||
isNoRotation: true,
|
||||
/** 信号字体对其方式*/
|
||||
isAlignCenter: false,
|
||||
/** 信号机名称字体大小*/
|
||||
signalTextFontSize: 10,
|
||||
/** 信号灯字体默认色*/
|
||||
signalDefaultTextColor: '#FFFFFF',
|
||||
/** 信号灯字体锁定颜色*/
|
||||
signalTextBlockColor: '#EF0C08',
|
||||
/** 信号字体*/
|
||||
signalTextblock: '#00FF00'
|
||||
distance: 3, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 12, // 信号机名称字体大小
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
lamp: {
|
||||
/** 禁止线宽度*/
|
||||
signalStopWidth: 2,
|
||||
/** 信号灯边框线宽度*/
|
||||
signalBorderWidth: 2,
|
||||
/** 信号灯边框线颜色*/
|
||||
signalBorderColor: '#3149C3',
|
||||
/** 信号灯半径*/
|
||||
signalR: 6,
|
||||
/** 信号灯锁闭*/
|
||||
signalBlockColor: '#EF0C08',
|
||||
/** 信号灯灰色*/
|
||||
signalLampGrayColor: '#7F7F7F',
|
||||
/** 信号灯红色*/
|
||||
signalLampRedColor: '#FF0000',
|
||||
/** 信号灯绿色*/
|
||||
signalLampGreenColor: '#00FF00',
|
||||
/** 信号灯黄色*/
|
||||
signalLampYellowColor: '#FFFF00',
|
||||
/** 信号灯白色*/
|
||||
signalLampWhiteColor: '#FFFFFF',
|
||||
/** 信号灯蓝色*/
|
||||
signalLampBlueColor: '#0070C0'
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
},
|
||||
route: {
|
||||
/** 自动进路方向*/
|
||||
signalRouteDirection: false,
|
||||
/** 自动进路偏移量*/
|
||||
signalRouteOffset: { x: -4, y: 0 },
|
||||
/** 自动进路*/
|
||||
signalRouteColor: '#00FF00'
|
||||
direction: false, // 自动进路方向
|
||||
offset: { x: -4, y: 0 }, // 自动进路偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
},
|
||||
auto: {
|
||||
/** 自动通过方向*/
|
||||
signalAutoDirection: false,
|
||||
/** 自动通过偏移量*/
|
||||
signalAutoOffset: { x: -4, y: 0},
|
||||
/** 人工控制*/
|
||||
signalManual: '#FFFF00',
|
||||
/** 自动进路*/
|
||||
signalAutoRoute: '#00FF00',
|
||||
/** 自动触发*/
|
||||
signalAutoTrigger: '#FFFF00',
|
||||
/** 出车冲突*/
|
||||
signalConflict: '#C00808'
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0}, // 自动通过偏移量
|
||||
manualControl: '#FFFF00', // 人工控制
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00', // 自动触发
|
||||
outConflict: '#C00808' // 出车冲突
|
||||
},
|
||||
delay: {
|
||||
/** 延迟解锁字体大小*/
|
||||
signalDelayTextFontSize: 9,
|
||||
/** 延时解锁方向*/
|
||||
signalDelayDirection: true,
|
||||
/** 延时解锁偏移量*/
|
||||
signalDelayOffset: { x: 15, y: -10},
|
||||
/** 延迟解锁颜色*/
|
||||
signalDelayTextColor: '#C00808'
|
||||
direction: true, // 延时解锁方向
|
||||
offset: { x: 15, y: -10}, // 延时解锁偏移量
|
||||
fontSize: 9, // 延迟解锁字体大小
|
||||
fontColor: '#C00808' // 延迟解锁颜色
|
||||
|
||||
},
|
||||
button: {
|
||||
/** 信号灯按钮距离区段的距离*/
|
||||
signalButtonDistance: 5,
|
||||
/** 信号灯按钮边线*/
|
||||
signalButtonDashColor: '#FFFFFF',
|
||||
/** 信号灯按钮颜色*/
|
||||
signalButtonColor: 'darkgreen',
|
||||
/** 信号灯按钮闪烁颜色*/
|
||||
signalButtonLightenColor: '#E4EF50'
|
||||
distance: 5, // 信号灯按钮距离区段的距离
|
||||
borderDashColor: '#FFFFFF', // 信号灯按钮边线
|
||||
buttonColor: 'darkgreen', // 信号灯按钮颜色
|
||||
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10 // 站台默认字体大小
|
||||
@ -165,209 +128,205 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
stand: { // 站台
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
spareColor: '#808080', // 站台空闲颜色
|
||||
stopColor: '#FFF000', // 站台列车停站颜色
|
||||
spareColor: '#606060', // 站台空闲颜色
|
||||
stopColor: '#FEFE00', // 站台列车停站颜色
|
||||
jumpStopColor: '#9A99FF', // 站台跳停颜色
|
||||
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
|
||||
closeColor: '#C00808' // 站台紧急关闭颜色
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
direction: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
AutoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: '扣', // 扣车显示内容
|
||||
direction: -1, // 扣车方向
|
||||
offset: {x: -8, y: -2}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C00808', // 车站+中心扣车颜色
|
||||
offset: {x: -8, y: -6}, // 扣车偏移量
|
||||
trainColor: '#E4EF50', // 车站扣车颜色
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
direction: -1, // 停跳方向
|
||||
offset: {x: -8, y: 4},
|
||||
textColor: '#0000FF', // 停跳文字颜色
|
||||
arcColor: '#0000FF', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8 // 圆半径大小
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
direction: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0' // 停站时间字体颜色
|
||||
offset: {x: -8, y: 26}, // 运行时间偏移量
|
||||
textColor: '#FFFFFF' // 停站时间字体颜色
|
||||
},
|
||||
level: { // 运行等级
|
||||
direction: 1, // 运行等级方向
|
||||
offset: {x: -8, y: 30}, // 运行等级偏移量
|
||||
textColor: '#FFF000' // 停站等级字体颜色
|
||||
offset: {x: -8, y: 6}, // 运行等级偏移量
|
||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#ffffff',
|
||||
fontWeight: 'normal',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
fontSize: 10, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
textAlign: 'middle', // 字体水平对齐
|
||||
textVerticalAlign: 'top' // 字体垂直对齐
|
||||
},
|
||||
singleControlNum: 2,
|
||||
stationOffset: {x: 0, y: 0},
|
||||
arrowsShow: true, // 控制模式箭头显隐
|
||||
/** 控制模式字体大小*/
|
||||
stationControlTextSize: 10,
|
||||
/** 控制模式灯的半径 */
|
||||
stationControlmodeR: 4,
|
||||
/** 控制模式之间灯之间的距离*/
|
||||
stationControlDistance: 36,
|
||||
/** 控制模式灰色*/
|
||||
stationControlGrayColor: '#7F7F7F',
|
||||
/** 控制模式绿色*/
|
||||
stationControlGreenColor: '#00FF00',
|
||||
/** 控制模式红色*/
|
||||
stationControlRedColor: '#FF0000',
|
||||
/** 控制模式黄色*/
|
||||
stationControlYellowColor: '#FFFF00'
|
||||
lamp: {
|
||||
count: 2, // 控制模式的个数
|
||||
offset: {x: 0, y: 0}, // 偏移量
|
||||
radiusR: 4, // 控制模式灯的半径
|
||||
distance: 36, // 控制模式之间灯之间的距离
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00' // 控制模式黄色
|
||||
},
|
||||
arrow: {
|
||||
show: true // 控制模式箭头显隐
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
kilometerPosition: 'up'
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
/** 道岔名称与区段距离*/
|
||||
switchNameDistance: 2,
|
||||
/** 道岔边框颜色*/
|
||||
switchTextBorderColor: '#FE0000',
|
||||
/** 道岔失去颜色*/
|
||||
switchTextLossColor: '#C00808',
|
||||
/** 道岔定位颜色*/
|
||||
switchTextLocateColor: '#00FF00',
|
||||
/** 道岔反位颜色*/
|
||||
switchInversionColor: '#FFFF00',
|
||||
/** 道岔单锁颜色*/
|
||||
switchMonolockColor: '#FFFFFF'
|
||||
distance: 2, // 道岔名称与区段距离
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#C00808', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
||||
},
|
||||
core: {
|
||||
/** 道岔单边长度 */
|
||||
switchLen: 6
|
||||
legnth: 6 // 道岔单边长度
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontSize: 10, // 字体大小
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#FFFF00'
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#FFFF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.ZcControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontSize: 10, // 字体大小
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#00FF00'
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#00FF00' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontSize: 10, // 字体大小
|
||||
distance: 5 // 灯跟文字距离
|
||||
},
|
||||
lamp: {
|
||||
radiusR: 6,
|
||||
controlColor: '#ECE9D8'
|
||||
radiusR: 6, // 控制灯大小
|
||||
controlColor: '#ECE9D8' // 控制灯颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF' // 线条颜色
|
||||
};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
trainWindowColor: '#4DD43F', // 车次窗颜色
|
||||
lineDash: null, // 车次窗虚线间隔
|
||||
trainWindowLineWidth: 1.5, // 车次窗线宽
|
||||
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
|
||||
};
|
||||
|
||||
this[deviceType.Train] = {
|
||||
/** 车身line宽 */
|
||||
trainBodyLineWidth: 0,
|
||||
trainBodyLineWidth: 0.1,
|
||||
/** 车身鼠标悬浮事件 */
|
||||
trainBodyOnMouseOver: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 车身鼠标移出事件 */
|
||||
trainBodyOnMouseOut: {train: true, textTrainNumber: false, textTrainServer: false, textTrainTarget: false, textTrainTargetNumber: false},
|
||||
/** 目的地码前缀*/
|
||||
targetCodePrefix: '000',
|
||||
/** 默认目的地码 */
|
||||
defaultTargetCode: 'AAA',
|
||||
/** 服务号(表号)前缀 */
|
||||
serviceNumberPrefix: '00',
|
||||
/** 默认服务号(表号) */
|
||||
defaultServiceNumber: 'BB',
|
||||
defaultServiceNumber: 'AA',
|
||||
/** 车次号前缀 */
|
||||
tripNumberPrefix: '0000',
|
||||
/** 默认车次号1 */
|
||||
defaultDirectionCode: 'D',
|
||||
tripNumberPrefix: '000',
|
||||
/** 默认车次号2 */
|
||||
defaultTripNumber: 'CCC',
|
||||
/** 车组号前缀 */
|
||||
groupNumberPrefix: '000',
|
||||
/** 默认车组号 */
|
||||
defaultGroupNumber: 'EEE',
|
||||
defaultTripNumber: 'DDD',
|
||||
/** 列车车头比车身高出的长度,上下相比车体伸出去的边框*/
|
||||
trainMoreLength: 1,
|
||||
trainMoreLength: 0,
|
||||
/** 列车车头三角坐标1偏移量 */
|
||||
trainHeadTriangleFirst: { x: 0, y: 0},
|
||||
trainHeadTriangleFirst: { x: 7, y: 1},
|
||||
/** 列车车头三角坐标2偏移量 */
|
||||
trainHeadTriangleSecond: { x: 4, y: 8.5},
|
||||
trainHeadTriangleSecond: { x: 13, y: 10},
|
||||
/** 列车车头三角坐标3偏移量 */
|
||||
trainHeadTriangleThird: { x: 0, y: 15},
|
||||
trainHeadTriangleThird: { x: 7, y: 19},
|
||||
/** 列车高度*/
|
||||
trainHeight: 17,
|
||||
trainHeight: 20,
|
||||
/** 列车和车头之间的间距*/
|
||||
trainHeadDistance: 2,
|
||||
trainHeadDistance: 4,
|
||||
/** 列车车头矩形高度 */
|
||||
trainHeadRectHeight: 15,
|
||||
trainHeadRectHeight: 20,
|
||||
/** 列车长度*/
|
||||
trainWidth: 76,
|
||||
trainWidth: 40,
|
||||
/** 列车竖杠的宽度*/
|
||||
trainConntWidth: 4,
|
||||
trainConntWidth: 3,
|
||||
/** 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 */
|
||||
changeTrainWidth: true,
|
||||
changeTrainWidth: false,
|
||||
/** 是否根据nameFormat去动态加载车组号、服务号、车次号、目的地码 */
|
||||
dynamicLoadingDisplay: true,
|
||||
dynamicLoadingDisplay: false,
|
||||
/** 特殊列车类型需设置显示格式 */
|
||||
specialTrainType: [{ type: '03', serviceNumber: 'MM', nameFormat: 'serviceNumber:groupNumber'}],
|
||||
specialTrainType: [],
|
||||
/** 两边间隔 */
|
||||
lrPadding: 1,
|
||||
lrPadding: 4,
|
||||
/** 上边距离 */
|
||||
upPadding: 1,
|
||||
upPadding: 4,
|
||||
/** HSDA两边间隔 */
|
||||
lrPaddingHSDA: 3,
|
||||
/** HSDA上边距离 */
|
||||
upPaddingHSDA: 4,
|
||||
/** 列车字号*/
|
||||
trainTextFontSize: 15,
|
||||
/** 目的地状态 01准点 02早点 03严重早点 04晚点 05严重晚点 06头码车 07ATP切除 */
|
||||
trainTextFontSize: 12,
|
||||
/** 目的地状态 01准点 02早点 03晚点 04头码车 */
|
||||
destinationStatus: [
|
||||
{status: '01', showColor: '#FFFFFF'},
|
||||
{status: '02', showColor: '#00FF00'},
|
||||
{status: '03', showColor: '#3265FF'},
|
||||
{status: '04', showColor: '#9B4A09'},
|
||||
{status: '05', showColor: '#EF0C08'},
|
||||
{status: '06', showColor: '#FFFFFF'},
|
||||
{status: '07', showColor: '#FFFF00'}
|
||||
{status: '03', showColor: '#A0522D'},
|
||||
{status: '04', showColor: '#FFFF00'}
|
||||
],
|
||||
/** 默认目的地状态显示颜色 */
|
||||
defaultDestinationColor: '#FFFFFF',
|
||||
/** 目的地状态设置的对应哪个text的颜色 */
|
||||
destinationStatusSetText: 'trainServer',
|
||||
destinationStatusSetText: 'trainTarget',
|
||||
/** 默认字体 族类*/
|
||||
textFontFormat: '宋体',
|
||||
textFontFormat: 'consolas',
|
||||
/** 列车HDSA字号*/
|
||||
trainHSDATextFontSize: 8,
|
||||
/** 服务号状态类型 eg:{type: '01', showColor: '#FFFFFF'} */
|
||||
serverNoType: [],
|
||||
/** 运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/
|
||||
trainHSDATextFontSize: 9,
|
||||
/** 服务号状态类型 01显示服务号 计划车 02显示车组号: 头码车与人工车 */
|
||||
serverNoType: [
|
||||
{type: '01', showColor: '#FFFFFF'},
|
||||
{type: '02', showColor: '#FFF000'}
|
||||
],
|
||||
/** 默认服务号状态显示颜色 */
|
||||
defaultServerNoColor: '#FFFFFF',
|
||||
/** 列车运行方向状态类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行*/
|
||||
directionType: [
|
||||
{type: '01', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: false },
|
||||
{type: '02', lineLShow: false, lineRShow: false, arrowLShow: false, arrowRShow: true },
|
||||
{type: '03', lineLShow: false, lineRShow: false, arrowLShow: true, arrowRShow: false }
|
||||
{type: '01', lineLShow: true, lineRShow: true, arrowLShow: false, arrowRShow: false },
|
||||
{type: '02', lineLShow: false, lineRShow: true, arrowLShow: false, arrowRShow: true },
|
||||
{type: '03', lineLShow: true, lineRShow: false, arrowLShow: true, arrowRShow: false }
|
||||
],
|
||||
/** 列车停止方向类型对应车头显示状态 01未知方向 02从左往右 上行 03从右往左 下行 */
|
||||
directionStopType: [
|
||||
@ -375,56 +334,60 @@ class SkinStyle extends defaultStyle {
|
||||
{type: '02', lineLShow: false, lineRShow: true},
|
||||
{type: '03', lineLShow: true, lineRShow: false}
|
||||
],
|
||||
/** 列车运行模式对应车头颜色 01信号中断 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM
|
||||
/** 列车运行模式对应车头颜色 01未知 02 ATO自动驾驶模式AM 03 ATP监控下的人工驾驶模式CM
|
||||
* 04 限制人工驾驶模式RM 05 非限制人工驾驶模式RM*/
|
||||
runModeStatus: [
|
||||
{status: '01', trainLColor: '#EF0C08', trainRColor: '#EF0C08'},
|
||||
{status: '01', trainLColor: '#FFFFFF', trainRColor: '#FFFFFF'},
|
||||
{status: '02', trainLColor: '#00FF00', trainRColor: '#00FF00'},
|
||||
{status: '03', trainLColor: '#FFFF00', trainRColor: '#FFFF00'},
|
||||
{status: '04', trainLColor: '#EA700D', trainRColor: '#EA700D'},
|
||||
{status: '04', trainLColor: '#A0522D', trainRColor: '#A0522D'},
|
||||
{status: '05', trainLColor: '#A0522D', trainRColor: '#A0522D'}
|
||||
],
|
||||
/** 设置运行控制状态类型 eg:{status: '01', hShow: false, sShow: false}, */
|
||||
runControlStatus: [],
|
||||
/** 设置车门状态类型 eg:{status: '01', dShow: false}, */
|
||||
doorStatus: [],
|
||||
/** 设置通信状态 eg:{status: '01', trainColor:'#725A64'}, */
|
||||
communicationStatus: [],
|
||||
/** 设置报警状态 eg:{status: '01', aShow: false}, */
|
||||
alarmStatus: [],
|
||||
/** 设置运行控制状态类型 01正常 02扣车 03停跳 */
|
||||
runControlStatus: [
|
||||
{status: '01', hShow: false, sShow: false},
|
||||
{status: '02', hShow: true, sShow: false},
|
||||
{status: '03', hShow: false, sShow: true}
|
||||
],
|
||||
/** 设置车门状态类型 01关门 02开门 */
|
||||
doorStatus: [
|
||||
{status: '01', dShow: false},
|
||||
{status: '02', dShow: true}
|
||||
],
|
||||
/** 设置通信状态 01正常 02故障 */
|
||||
communicationStatus: [
|
||||
{status: '01', trainColor: '#725A64'},
|
||||
{status: '02', trainColor: '#C0C0C0'}
|
||||
],
|
||||
/** 设置报警状态 01不报警 02报警 */
|
||||
alarmStatus: [
|
||||
{status: '01', aShow: false},
|
||||
{status: '02', aShow: true}
|
||||
],
|
||||
/** 列车车头矩形填充颜色 */
|
||||
trainHeadFillColor: '#EF0C08',
|
||||
trainHeadFillColor: '#000000',
|
||||
/** 列车车身填充颜色 */
|
||||
trainBodyFillColor: '#000000',
|
||||
/** 列车服务号偏移 */
|
||||
trainServerOffset: { x: -1, y: 1},
|
||||
/** 列车车次号偏移 */
|
||||
trainTargetOffset: { x: -1, y: 1},
|
||||
/** 列车显示格式 */
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber',
|
||||
/** 字体大小 */
|
||||
nameFontSize: 10,
|
||||
/** 目的地码文字显示位置 */
|
||||
trainTargetTextAlign: 'left',
|
||||
trainBodyFillColor: '#725A64',
|
||||
/** textH文本 */
|
||||
textHContent: 'H',
|
||||
/** textS文本 */
|
||||
textSContent: 'S',
|
||||
/** textD文本 */
|
||||
textDContent: 'D',
|
||||
/** textA文本 */
|
||||
textAContent: 'A',
|
||||
/** 是否需创建textHSDA对象 */
|
||||
haveTextHSDA: false,
|
||||
haveTextHSDA: true,
|
||||
/** 是否需创建arrowText对象 */
|
||||
haveArrowText: true,
|
||||
/** 是否需创建trainBorder对象 */
|
||||
haveTrainBorder: false
|
||||
};
|
||||
this[deviceType.TrainWindow] = {
|
||||
/** 车次窗颜色*/
|
||||
trainWindowColor: '#4DD43F',
|
||||
/** 车次窗虚线间隔 */
|
||||
lineDash: null,
|
||||
/** 车次窗线宽 */
|
||||
trainWindowLineWidth: 1.5,
|
||||
/** 车次窗矩形圆滑程度 */
|
||||
trainWindowSmooth: 0
|
||||
};
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF'
|
||||
haveTrainBorder: false,
|
||||
/** 列车服务号偏移 */
|
||||
trainServerOffset: { x: 4, y: 4},
|
||||
/** 列车车次号偏移 */
|
||||
trainTargetOffset: { x: 36, y: 4},
|
||||
/** 目的地码文字显示位置 */
|
||||
trainTargetTextAlign: 'right'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -5,15 +5,12 @@ class SkinStyle extends defaultStyle {
|
||||
constructor() {
|
||||
super();
|
||||
this[deviceType.Link] = {
|
||||
/** line 颜色*/
|
||||
lineWidthColor: '#FFFFFF',
|
||||
/** link 宽度*/
|
||||
linkWidth: 4.4,
|
||||
/** link 线条颜色*/
|
||||
linkColor: '#3F3F3F',
|
||||
/** link 字体颜色*/
|
||||
linkTextColor: '#FFFFFF'
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
};
|
||||
|
||||
this[deviceType.Section] = {
|
||||
text: { // 区段文字属性
|
||||
fontSize: 10, // 字体大小
|
||||
@ -62,92 +59,60 @@ class SkinStyle extends defaultStyle {
|
||||
color: '#3149C3' // 区段边界符颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
/** 设备距离区段的距离*/
|
||||
signalDistance: 10,
|
||||
signalDistance: 10, // 设备距离区段的距离
|
||||
post: {
|
||||
signalLampStandardColor: '#3149C3',
|
||||
signalLampStandardWidth: 2
|
||||
standardColor: '#3149C3', // 灯珠颜色
|
||||
standardWidth: 2 // 灯珠宽度
|
||||
},
|
||||
text: {
|
||||
/** 文字和灯杆的距离*/
|
||||
distance: 0,
|
||||
/** 是否禁止旋转*/
|
||||
isNoRotation: true,
|
||||
/** 信号字体对其方式*/
|
||||
isAlignCenter: true,
|
||||
/** 信号机名称字体大小*/
|
||||
signalTextFontSize: 10,
|
||||
/** 信号灯字体默认色*/
|
||||
signalDefaultTextColor: '#FFFFFF',
|
||||
/** 信号灯字体锁定颜色*/
|
||||
signalTextBlockColor: '#EF0C08',
|
||||
/** 信号字体*/
|
||||
signalTextblock: '#00FF00'
|
||||
distance: 0, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: true, // 信号字体对其方式
|
||||
fontSize: 10, // 信号机名称字体大小
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号字体
|
||||
},
|
||||
lamp: {
|
||||
/** 禁止线宽度*/
|
||||
signalStopWidth: 2,
|
||||
/** 信号灯边框线宽度*/
|
||||
signalBorderWidth: 0.5,
|
||||
/** 信号灯边框线颜色*/
|
||||
signalBorderColor: '#3149C3',
|
||||
/** 信号灯半径*/
|
||||
signalR: 6,
|
||||
/** 信号灯锁闭*/
|
||||
signalBlockColor: '#EF0C08',
|
||||
/** 信号灯灰色*/
|
||||
signalLampGrayColor: '#7F7F7F',
|
||||
/** 信号灯红色*/
|
||||
signalLampRedColor: '#FF0000',
|
||||
/** 信号灯绿色*/
|
||||
signalLampGreenColor: '#00FF00',
|
||||
/** 信号灯黄色*/
|
||||
signalLampYellowColor: '#FFFF00',
|
||||
/** 信号灯白色*/
|
||||
signalLampWhiteColor: '#FFFFFF',
|
||||
/** 信号灯蓝色*/
|
||||
signalLampBlueColor: '#0070C0'
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 0.5, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
},
|
||||
route: {
|
||||
/** 自动进路方向*/
|
||||
signalRouteDirection: false,
|
||||
/** 自动进路偏移量*/
|
||||
signalRouteOffset: { x: -4, y: 0 },
|
||||
/** 自动进路*/
|
||||
signalRouteColor: '#00FF00'
|
||||
direction: false, // 自动进路方向
|
||||
offset: { x: -4, y: 0 }, // 自动进路偏移量
|
||||
routeColor: '#00FF00' // 自动进路
|
||||
},
|
||||
auto: {
|
||||
/** 自动通过方向*/
|
||||
signalAutoDirection: false,
|
||||
/** 自动通过偏移量*/
|
||||
signalAutoOffset: { x: -4, y: 0},
|
||||
/** 自动进路*/
|
||||
signalAutoRoute: '#00FF00',
|
||||
/** 自动触发*/
|
||||
signalAutoTrigger: '#FFFF00'
|
||||
direction: false, // 自动通过方向
|
||||
offset: { x: -4, y: 0}, // 自动通过偏移量
|
||||
autoRoute: '#00FF00', // 自动进路
|
||||
autoTrigger: '#FFFF00' // 自动触发
|
||||
},
|
||||
delay: {
|
||||
/** 延迟解锁字体大小*/
|
||||
signalDelayTextFontSize: 9,
|
||||
/** 延时解锁方向*/
|
||||
signalDelayDirection: true,
|
||||
/** 延时解锁偏移量*/
|
||||
signalDelayOffset: { x: 15, y: -10},
|
||||
/** 延迟解锁颜色*/
|
||||
signalDelayTextColor: '#FF0000'
|
||||
direction: true, // 延时解锁方向
|
||||
offset: { x: 15, y: -10}, // 延时解锁偏移量
|
||||
fontSize: 9, // 延迟解锁字体大小
|
||||
fontColor: '#FF0000' // 延迟解锁颜色
|
||||
},
|
||||
button: {
|
||||
/** 信号灯按钮距离区段的距离*/
|
||||
signalButtonDistance: 5,
|
||||
/** 信号灯按钮边线*/
|
||||
signalButtonDashColor: '#FFFFFF',
|
||||
/** 信号灯按钮颜色*/
|
||||
signalButtonColor: 'darkgreen',
|
||||
/** 信号灯按钮闪烁颜色*/
|
||||
signalButtonLightenColor: '#E4EF50'
|
||||
distance: 5, // 信号灯按钮距离区段的距离
|
||||
borderDashColor: '#FFFFFF', // 信号灯按钮边线
|
||||
buttonColor: 'darkgreen', // 信号灯按钮颜色
|
||||
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10 // 站台默认字体大小
|
||||
@ -174,7 +139,7 @@ class SkinStyle extends defaultStyle {
|
||||
direction: 0, // 折返方向
|
||||
offset: {x: -16, y: 20}, // 折返偏移量
|
||||
noHumanColor: '#0F16DA', // 站台无人折返
|
||||
AutoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
||||
},
|
||||
detainCar: { // 扣车
|
||||
text: 'H', // 扣车显示内容
|
||||
@ -196,56 +161,66 @@ class SkinStyle extends defaultStyle {
|
||||
textColor: '#FFFFFF' // 停站等级字体颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.StationControl] = {
|
||||
text: {
|
||||
fontSize: 10,
|
||||
fontFormat: 'consolas',
|
||||
fontColor: '#ffffff',
|
||||
fontWeight: 'normal',
|
||||
textAlign: 'middle',
|
||||
textVerticalAlign: 'top'
|
||||
fontSize: 10, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
textAlign: 'middle', // 字体水平对齐
|
||||
textVerticalAlign: 'top' // 字体垂直对齐
|
||||
},
|
||||
singleControlNum: 2,
|
||||
stationOffset: {x: 0, y: 0},
|
||||
arrowsShow: true, // 控制模式箭头显隐
|
||||
/** 控制模式字体大小*/
|
||||
stationControlTextSize: 10,
|
||||
/** 控制模式灯的半径 */
|
||||
stationControlmodeR: 4,
|
||||
/** 控制模式之间灯之间的距离*/
|
||||
stationControlDistance: 36,
|
||||
/** 控制模式灰色*/
|
||||
stationControlGrayColor: '#7F7F7F',
|
||||
/** 控制模式绿色*/
|
||||
stationControlGreenColor: '#00FF00',
|
||||
/** 控制模式红色*/
|
||||
stationControlRedColor: '#FF0000',
|
||||
/** 控制模式黄色*/
|
||||
stationControlYellowColor: '#FFFF00'
|
||||
};
|
||||
this[deviceType.Station] = {
|
||||
kilometerPosition: 'up'
|
||||
};
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
/** 道岔名称与区段距离*/
|
||||
switchNameDistance: 2,
|
||||
/** 道岔边框颜色*/
|
||||
switchTextBorderColor: '#FE0000',
|
||||
/** 道岔失去颜色*/
|
||||
switchTextLossColor: '#FFFFFF',
|
||||
/** 道岔定位颜色*/
|
||||
switchTextLocateColor: '#00FF00',
|
||||
/** 道岔反位颜色*/
|
||||
switchInversionColor: '#9C9D09',
|
||||
/** 道岔单锁颜色*/
|
||||
switchMonolockColor: '#870E10'
|
||||
lamp: {
|
||||
count: 2, // 控制模式灯个数
|
||||
offset: {x: 0, y: 0}, // 控制模式灯偏移量
|
||||
radiusR: 4, // 控制模式灯的半径
|
||||
distance: 36, // 控制模式之间灯之间的距离
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00' // 控制模式黄色
|
||||
},
|
||||
core: {
|
||||
/** 道岔单边长度 */
|
||||
switchLen: 6
|
||||
arrow: {
|
||||
show: true // 控制模式箭头显隐
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
||||
this[deviceType.Switch] = {
|
||||
text: {
|
||||
distance: 2, // 道岔名称与区段距离
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#9C9D09', // 道岔反位颜色
|
||||
monolockColor: '#870E10' // 道岔单锁颜色
|
||||
},
|
||||
core: {
|
||||
legnth: 6 // 道岔单边长度
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF' // 线条颜色
|
||||
};
|
||||
|
||||
this[deviceType.LcControl] = {};
|
||||
|
||||
this[deviceType.ZcControl] = {};
|
||||
|
||||
this[deviceType.LimitControl] = {};
|
||||
|
||||
this[deviceType.TrainWindow] = {
|
||||
trainWindowColor: '#4DD43F', // 车次窗颜色
|
||||
lineDash: null, // 车次窗虚线间隔
|
||||
trainWindowLineWidth: 1.5, // 车次窗线宽
|
||||
trainWindowSmooth: 0 // 车次窗矩形圆滑程度
|
||||
};
|
||||
|
||||
this[deviceType.Train] = {
|
||||
/** 车身line宽 */
|
||||
trainBodyLineWidth: 0,
|
||||
@ -369,22 +344,6 @@ class SkinStyle extends defaultStyle {
|
||||
/** 是否需创建trainBorder对象 */
|
||||
haveTrainBorder: false
|
||||
};
|
||||
this[deviceType.TrainWindow] = {
|
||||
/** 车次窗颜色*/
|
||||
trainWindowColor: '#4DD43F',
|
||||
/** 车次窗虚线间隔 */
|
||||
lineDash: null,
|
||||
/** 车次窗线宽 */
|
||||
trainWindowLineWidth: 1.5,
|
||||
/** 车次窗矩形圆滑程度 */
|
||||
trainWindowSmooth: 0
|
||||
};
|
||||
this[deviceType.Line] = {
|
||||
lineColor: '#FFFFFF'
|
||||
};
|
||||
this[deviceType.LcControl] = {};
|
||||
this[deviceType.ZcControl] = {};
|
||||
this[deviceType.LimitControl] = {};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ import JTriangle from '../../utils/JTriangle';
|
||||
// ctx.bezierCurveTo(shape[`cpx1`], shape[`cpy1`], shape[`cpx2`], shape[`cpy2`], shape[`x2`], shape[`y2`]);
|
||||
// }
|
||||
// } else {
|
||||
// const swPadding = model.style.Switch.core.switchLen; // 定位和反位时区段距离岔芯的距离
|
||||
// const swPadding = model.style.Switch.core.legnth; // 定位和反位时区段距离岔芯的距离
|
||||
// var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
||||
// const beg = Object.assign({}, model.points[0]);
|
||||
// const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||
@ -117,7 +117,7 @@ export default class ELimitLines extends Group {
|
||||
// const beg = Object.assign({}, model.points[0]);
|
||||
// const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||
|
||||
const swPadding = model.style.Switch.core.switchLen; // 定位和反位时区段距离岔芯的距离
|
||||
const swPadding = model.style.Switch.core.legnth; // 定位和反位时区段距离岔芯的距离
|
||||
var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
||||
const beg = Object.assign({}, model.points[0]);
|
||||
const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||
|
@ -4,11 +4,10 @@ import ERelease from './ERelease'; // 线段 (共有)
|
||||
import ELimitLines from './ELimitLines'; // 区段限速 (私有)
|
||||
import ELines from './ELines'; // 创建多线条 曲线 (私有)
|
||||
import ESeparator from './ESeparator'; // 分隔符 (私有)
|
||||
import EMouse from './EMouse';
|
||||
import { EAxle } from './EAxle'; // 创建计轴 (私有)
|
||||
import { EBackArrow } from './EBackArrow'; // 折返进路箭头
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import EMouse from './EMouse';
|
||||
|
||||
/** 区段*/
|
||||
export default class Section extends Group {
|
||||
@ -72,7 +71,6 @@ export default class Section extends Group {
|
||||
}
|
||||
|
||||
createTurnBack() {
|
||||
// const radius = 3;
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
@ -210,7 +208,7 @@ export default class Section extends Group {
|
||||
|
||||
// 创建区段名称
|
||||
const fontSize = model.type == '02' ? style.Section.text.fontSize + 2: style.Section.text.fontSize;
|
||||
this.sectionText = new ETextName({
|
||||
this.name = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z + 2,
|
||||
style: this.style,
|
||||
@ -226,7 +224,7 @@ export default class Section extends Group {
|
||||
textPosition: style.Section.text.textPosition,
|
||||
textVerticalAlign: style.Section.text.textVerticalAlign
|
||||
});
|
||||
this.add(this.sectionText);
|
||||
this.add(this.name);
|
||||
}
|
||||
|
||||
/** 站台轨名称*/
|
||||
@ -742,8 +740,10 @@ export default class Section extends Group {
|
||||
}
|
||||
|
||||
getBoundingRect() {
|
||||
if (this.section) return this.section.getBoundingRect();
|
||||
if (this.sectionText) return this.sectionText.getBoundingRect();
|
||||
return new BoundingRect();
|
||||
if (this.section) {
|
||||
return this.section.getBoundingRect();
|
||||
} else {
|
||||
return super.getBoundingRect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class ESigPass extends Group {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const rotation = model.drict != 1? 0 : Math.PI;
|
||||
const point = arrows(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.signalR * 0.8);
|
||||
const point = arrows(model.x, model.y, style.Signal.signalAutoWidth, style.Signal.lamp.radiusR * 0.8);
|
||||
|
||||
this.isNew = true;
|
||||
this.arrows = new Polygon({
|
||||
@ -70,7 +70,7 @@ class ESigPass extends Group {
|
||||
// 显示
|
||||
show() {
|
||||
this.create();
|
||||
this.arrows.show();
|
||||
this.arrow.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ class ESigButton extends Group {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const padding = 1;
|
||||
const r = style.Signal.lamp.signalR * 0.8;
|
||||
const r = style.Signal.lamp.radiusR * 0.8;
|
||||
|
||||
this.isNew = true;
|
||||
this.sigNormalButtom = new Rect({
|
||||
@ -25,15 +25,15 @@ class ESigButton extends Group {
|
||||
_subType: 'SignalButton',
|
||||
_val: '1',
|
||||
shape: {
|
||||
x: model.x - style.Signal.lamp.signalR,
|
||||
x: model.x - style.Signal.lamp.radiusR,
|
||||
y: model.y - r + r * model.posit,
|
||||
width: style.Signal.lamp.signalR * 2,
|
||||
height: style.Signal.lamp.signalR * 2
|
||||
width: style.Signal.lamp.radiusR * 2,
|
||||
height: style.Signal.lamp.radiusR * 2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.2,
|
||||
stroke: style.Signal.button.signalButtonDashColor,
|
||||
fill: style.Signal.button.signalButtonColor
|
||||
stroke: style.Signal.button.borderDashColor,
|
||||
fill: style.Signal.button.buttonColor
|
||||
}
|
||||
});
|
||||
|
||||
@ -62,12 +62,12 @@ class ESigButton extends Group {
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y - 5 / 2 * r * model.posit,
|
||||
r: style.Signal.lamp.signalR
|
||||
r: style.Signal.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.2,
|
||||
stroke: style.Signal.button.signalButtonDashColor,
|
||||
fill: style.Signal.button.signalButtonColor
|
||||
stroke: style.Signal.button.borderDashColor,
|
||||
fill: style.Signal.button.buttonColor
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -22,12 +22,12 @@ class ESigLamp extends Group {
|
||||
shape: {
|
||||
cx: model.x,
|
||||
cy: model.y,
|
||||
r: style.Signal.lamp.signalR
|
||||
r: style.Signal.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.signalBorderWidth,
|
||||
lineWidth: style.Signal.lamp.borderWidth,
|
||||
fill: style.backgroundColor,
|
||||
stroke: style.Signal.post.signalLampStandardColor
|
||||
stroke: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
|
||||
@ -41,13 +41,13 @@ class ESigLamp extends Group {
|
||||
y: model.originY
|
||||
},
|
||||
shape: {
|
||||
x1: model.x + (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.signalR + 1) * Math.sin(Math.PI / 4),
|
||||
x2: model.x - (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4),
|
||||
y2: model.y - (style.Signal.lamp.signalR + 1) * Math.sin(Math.PI / 4)
|
||||
x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4),
|
||||
x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4),
|
||||
y2: model.y - (style.Signal.lamp.radiusR + 1) * Math.sin(Math.PI / 4)
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.signalStopWidth,
|
||||
lineWidth: style.Signal.lamp.stopWidth,
|
||||
stroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
@ -62,13 +62,13 @@ class ESigLamp extends Group {
|
||||
y: model.originY
|
||||
},
|
||||
shape: {
|
||||
x1: model.x + (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.signalR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)),
|
||||
x2: model.x - (style.Signal.lamp.signalR + 1) * Math.cos(Math.PI / 4),
|
||||
y2: model.y - (style.Signal.lamp.signalR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2))
|
||||
x1: model.x + (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4),
|
||||
y1: model.y + (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2)),
|
||||
x2: model.x - (style.Signal.lamp.radiusR + 1) * Math.cos(Math.PI / 4),
|
||||
y2: model.y - (style.Signal.lamp.radiusR + 1) * (Math.sin(Math.PI / 4) - Math.sqrt(2))
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.lamp.signalStopWidth,
|
||||
lineWidth: style.Signal.lamp.stopWidth,
|
||||
stroke: style.backgroundColor
|
||||
}
|
||||
});
|
||||
|
@ -19,13 +19,13 @@ class ESigPost extends Group {
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: [
|
||||
[model.x, model.y + style.Signal.lamp.signalR * 1.2],
|
||||
[model.x, model.y - style.Signal.lamp.signalR * 1.2]
|
||||
[model.x, model.y + style.Signal.lamp.radiusR * 1.2],
|
||||
[model.x, model.y - style.Signal.lamp.radiusR * 1.2]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.post.signalLampStandardWidth,
|
||||
stroke: style.Signal.post.signalLampStandardColor
|
||||
lineWidth: style.Signal.post.standardWidth,
|
||||
stroke: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
|
||||
@ -35,12 +35,12 @@ class ESigPost extends Group {
|
||||
shape: {
|
||||
points: [
|
||||
[model.x, model.y],
|
||||
[model.x + model.drict * style.Signal.lamp.signalR * 1.2, model.y]
|
||||
[model.x + model.drict * style.Signal.lamp.radiusR * 1.2, model.y]
|
||||
]
|
||||
},
|
||||
style: {
|
||||
lineWidth: style.Signal.post.signalLampStandardWidth,
|
||||
stroke: style.Signal.post.signalLampStandardColor
|
||||
lineWidth: style.Signal.post.standardWidth,
|
||||
stroke: style.Signal.post.standardColor
|
||||
}
|
||||
});
|
||||
|
||||
@ -55,12 +55,12 @@ class ESigPost extends Group {
|
||||
const style = this.model.style;
|
||||
if (type === '01') {
|
||||
return {
|
||||
x: model.x + model.drict * style.Signal.lamp.signalR * 3 / 2,
|
||||
x: model.x + model.drict * style.Signal.lamp.radiusR * 3 / 2,
|
||||
y: model.y
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
x: this.hor.shape.points[1][0] + model.drict * style.Signal.lamp.signalR,
|
||||
x: this.hor.shape.points[1][0] + model.drict * style.Signal.lamp.radiusR,
|
||||
y: this.hor.shape.points[1][1]
|
||||
};
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ class ESigDrict extends Group {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
points: triangular(model.x, model.y, model.drict, style.Signal.lamp.signalR)
|
||||
points: triangular(model.x, model.y, model.drict, style.Signal.lamp.radiusR)
|
||||
},
|
||||
style: {
|
||||
stroke: style.backgroundColor,
|
||||
lineWidth: 0.5,
|
||||
fill: style.Signal.route.signalRouteColor
|
||||
fill: style.Signal.route.routeColor
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -44,7 +44,7 @@ class Signal extends Group {
|
||||
drict: drict,
|
||||
type: model.lampPostType,
|
||||
x: model.position.x,
|
||||
y: model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.signalR)
|
||||
y: model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.radiusR)
|
||||
});
|
||||
|
||||
// 信号灯
|
||||
@ -57,7 +57,7 @@ class Signal extends Group {
|
||||
style: style,
|
||||
index: i + 1,
|
||||
drict: drict,
|
||||
x: endPoint.x + i * drict * style.Signal.lamp.signalR * 2,
|
||||
x: endPoint.x + i * drict * style.Signal.lamp.radiusR * 2,
|
||||
y: endPoint.y,
|
||||
originX: model.position.x,
|
||||
originY: model.position.y
|
||||
@ -67,8 +67,8 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
// 信号机名称
|
||||
const sigNameX = model.position.x - drict * (style.Signal.post.signalLampStandardWidth) + model.namePosition.x;
|
||||
const sigNameY = model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.signalR * 2 + model.namePosition.y + style.Signal.text.distance);
|
||||
const sigNameX = model.position.x - drict * (style.Signal.post.standardWidth) + model.namePosition.x;
|
||||
const sigNameY = model.position.y + posit * (style.Signal.signalDistance + style.Section.line.width + style.Signal.lamp.radiusR * 2 + model.namePosition.y + style.Signal.text.distance);
|
||||
const textAlign = style.Signal.text.isAlignCenter ? 'middle': this.model.directionType == '01'? 'right': 'left';
|
||||
const textVerticalAlign = posit == 1 ? 'top' : 'bottom';
|
||||
this.sigName = new ESigName({
|
||||
@ -81,17 +81,17 @@ class Signal extends Group {
|
||||
y: sigNameY,
|
||||
text: model.name,
|
||||
fontWeight: 'normal',
|
||||
fontSize: style.Signal.text.signalTextFontSize,
|
||||
fontSize: style.Signal.text.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
textFill: style.Signal.text.signalDefaultTextColor,
|
||||
textFill: style.Signal.text.defaultColor,
|
||||
textAlign: textAlign,
|
||||
textVerticalAlign: textVerticalAlign
|
||||
});
|
||||
|
||||
// 自动进路
|
||||
const sigRouteH = style.Signal.route.signalRouteDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2;
|
||||
const sigRouteX = endPoint.x + (style.Signal.route.signalRouteOffset.x + sigRouteH) * drict;
|
||||
const sigRouteY = endPoint.y + (style.Signal.route.signalRouteOffset.y);
|
||||
const sigRouteH = style.Signal.route.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigRouteX = endPoint.x + (style.Signal.route.offset.x + sigRouteH) * drict;
|
||||
const sigRouteY = endPoint.y + (style.Signal.route.offset.y);
|
||||
this.sigRoute = new ESigRoute({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -102,9 +102,9 @@ class Signal extends Group {
|
||||
});
|
||||
|
||||
// 自动通过
|
||||
const sigAutoH = style.Signal.auto.signalAutoDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2;
|
||||
const sigAutoX = endPoint.x + (style.Signal.auto.signalAutoOffset.x + sigAutoH) * drict;
|
||||
const sigAutoY = endPoint.y + (style.Signal.auto.signalAutoOffset.y);
|
||||
const sigAutoH = style.Signal.auto.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigAutoX = endPoint.x + (style.Signal.auto.offset.x + sigAutoH) * drict;
|
||||
const sigAutoY = endPoint.y + (style.Signal.auto.offset.y);
|
||||
this.sigAuto = new ESigAuto({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -114,15 +114,15 @@ class Signal extends Group {
|
||||
x: sigAutoX,
|
||||
y: sigAutoY,
|
||||
width: style.Signal.signalAutoWidth,
|
||||
fill: style.Signal.lamp.signalAutoRoute,
|
||||
fill: style.Signal.lamp.autoRoute,
|
||||
lineWidth: 0.6,
|
||||
stroke: style.sidelineColor
|
||||
});
|
||||
|
||||
// 延迟解锁
|
||||
const sigDelayH = style.Signal.delay.signalDelayDirection ? this.count * style.Signal.lamp.signalR * 2 : -style.Signal.lamp.signalR * 2;
|
||||
const sigDelayX = endPoint.x + (style.Signal.delay.signalDelayOffset.x + sigDelayH) * drict;
|
||||
const sigDelayY = endPoint.y - (style.Signal.delay.signalDelayOffset.y) * posit;
|
||||
const sigDelayH = style.Signal.delay.direction ? this.count * style.Signal.lamp.radiusR * 2 : -style.Signal.lamp.radiusR * 2;
|
||||
const sigDelayX = endPoint.x + (style.Signal.delay.offset.x + sigDelayH) * drict;
|
||||
const sigDelayY = endPoint.y - (style.Signal.delay.offset.y) * posit;
|
||||
this.sigDelay = new ESigDelay({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -130,10 +130,10 @@ class Signal extends Group {
|
||||
x: sigDelayX,
|
||||
y: sigDelayY,
|
||||
fontWeight: 'bold',
|
||||
fontSize: style.Signal.delay.signalDelayTextFontSize,
|
||||
fontSize: style.Signal.delay.fontSize,
|
||||
fontFamily: style.textFontFormat,
|
||||
text: this.model.delayCount || '0',
|
||||
textFill: style.Signal.delay.signalDelayTextColor,
|
||||
textFill: style.Signal.delay.fontColor,
|
||||
textAlign: drict > 0 ? 'right' : 'left',
|
||||
textVerticalAlign: 'middle'
|
||||
});
|
||||
@ -146,7 +146,7 @@ class Signal extends Group {
|
||||
posit: posit,
|
||||
show: model.buttonShow,
|
||||
x: model.buttonPosition.x,
|
||||
y: model.buttonPosition.y - posit * (style.Signal.button.signalButtonDistance + style.Signal.lamp.signalR * 2)
|
||||
y: model.buttonPosition.y - posit * (style.Signal.button.distance + style.Signal.lamp.radiusR * 2)
|
||||
});
|
||||
|
||||
this.add(this.sigPost);
|
||||
@ -191,7 +191,7 @@ class Signal extends Group {
|
||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
@ -200,7 +200,7 @@ class Signal extends Group {
|
||||
} else if (this.count == 2 && this.model.lightType == '02') { // 双灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
@ -210,26 +210,26 @@ class Signal extends Group {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') { // 单灯 逻辑点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1) {
|
||||
if (this.lamps[0]) {
|
||||
if (this.model.useType == '05') {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -240,7 +240,7 @@ class Signal extends Group {
|
||||
if (this.count == 2 && this.model.lightType == '01' && this.model.switchLocateType == '01') { // 双灯 物理点灯 道岔定位
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
@ -249,7 +249,7 @@ class Signal extends Group {
|
||||
} else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '01') { // 双灯 逻辑点灯 道岔定位
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
@ -262,7 +262,7 @@ class Signal extends Group {
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.signalLampYellowColor);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '02') { // 双灯 逻辑点灯 道岔反位
|
||||
if (this.lamps[0]) {
|
||||
@ -271,32 +271,32 @@ class Signal extends Group {
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.signalLampYellowColor);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '02') { // 单灯 物理点灯 允许调车
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
// 出站信号机/阻隔信号机
|
||||
if (['02', '06'].includes(this.model.useType)) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
} else {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampWhiteColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '01' ) {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampGreenColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -305,7 +305,7 @@ class Signal extends Group {
|
||||
trainRoute() {
|
||||
if (this.count == 1) {
|
||||
/** 单灯 列兼调信号*/
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampYellowColor);
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -314,7 +314,7 @@ class Signal extends Group {
|
||||
if (this.count == 1) {
|
||||
/** 单灯 列兼调信号*/
|
||||
/** 单灯 阻挡兼调车信号*/
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.signalLampWhiteColor);
|
||||
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,11 +323,11 @@ class Signal extends Group {
|
||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯 允许引导信号
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.signalLampYellowColor);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -335,25 +335,25 @@ class Signal extends Group {
|
||||
// 封锁
|
||||
block() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setNameBorder(1)
|
||||
}
|
||||
this.sigName.setColor(this.style.Signal.text.signalTextBlockColor);
|
||||
this.sigName.setColor(this.style.Signal.text.blockColor);
|
||||
}
|
||||
|
||||
// 功能封锁
|
||||
functionBlock() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
// this.siglamp.setRectBlockByIndex(1, true);
|
||||
}
|
||||
}
|
||||
|
||||
// 信号保护区段监视状态显示
|
||||
signalblock() {
|
||||
signalCheck() {
|
||||
if (this.count == 1) {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampRedColor);
|
||||
this.sigName.setColor(this.style.Signal.text.signalTextblock);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
|
||||
this.sigName.setColor(this.style.Signal.text.checkColor);
|
||||
}
|
||||
}
|
||||
|
||||
@ -362,11 +362,11 @@ class Signal extends Group {
|
||||
if (this.count == 2 && this.model.lightType == '01') { // 双灯 物理点灯
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.signalLampBlueColor);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
if (this.lamps[1]) {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.signalLampBlueColor);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.blueColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -389,7 +389,7 @@ class Signal extends Group {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
|
||||
this.sigAuto.setColor(this.style.Signal.auto.signalAutoRoute);
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoRoute);
|
||||
}
|
||||
|
||||
// 信号机进路自动触发模式状态类型
|
||||
@ -400,7 +400,7 @@ class Signal extends Group {
|
||||
this.sigAuto.hide();
|
||||
}
|
||||
|
||||
this.sigAuto.setColor(this.style.Signal.auto.signalAutoTrigger);
|
||||
this.sigAuto.setColor(this.style.Signal.auto.autoTrigger);
|
||||
}
|
||||
|
||||
// 设置自动信号模式状态类型
|
||||
@ -429,7 +429,7 @@ class Signal extends Group {
|
||||
recover() {
|
||||
this.sigDelay.hide();
|
||||
this.sigAuto.animationRecover();
|
||||
this.sigName.setColor(this.style.Signal.text.signalDefaultTextColor);
|
||||
this.sigName.setColor(this.style.Signal.text.defaultColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
@ -443,7 +443,7 @@ class Signal extends Group {
|
||||
case '04': this.block(); break; // 封锁
|
||||
case '05': this.fault(); break; // 故障
|
||||
case '06': this.block(); break; // 功能封锁
|
||||
case '07': this.signalblock(); break; // 信号保护区段检测
|
||||
case '07': this.signalCheck(); break; // 信号保护区段检测
|
||||
}
|
||||
|
||||
/** 进路性质类型*/
|
||||
@ -467,12 +467,12 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
/** 延时解锁*/
|
||||
model.delayType = '02';
|
||||
switch (model.delayType) {
|
||||
case '01': break; // 未延时解锁
|
||||
case '02': break; // 人工闭塞延时解锁
|
||||
case '03': break; // 自动闭塞延时解锁
|
||||
}
|
||||
// model.delayType = '02';
|
||||
// switch (model.delayType) {
|
||||
// case '01': this.setDelayUnlock(); break; // 未延时解锁
|
||||
// case '02': this.setDelayUnlock(); break; // 人工闭塞延时解锁
|
||||
// case '03': this.setDelayUnlock(); break; // 自动闭塞延时解锁
|
||||
// }
|
||||
|
||||
/** 信号机进路办理,先停止动画,再判断当前颜色是否闪烁*/
|
||||
if (model.routeSetting && (model.autoType == '03' || model.autoType == '04')) {
|
||||
@ -491,7 +491,7 @@ class Signal extends Group {
|
||||
getShapeTipPoint(opts) {
|
||||
var rect = new BoundingRect(0, 0, 0, 0);
|
||||
var drict = this.model.directionType == '01' ? -1 : 1; // 朝向 左:右
|
||||
var offsetY = this.model.positionType == '01' ? this.style.Signal.text.signalTextFontSize : 0; // 位置 上:下
|
||||
var offsetY = this.model.positionType == '01' ? this.style.Signal.text.fontSize : 0; // 位置 上:下
|
||||
if (opts.val == '1' || opts.val == '2') {
|
||||
rect = this.sigButton.getBoundingRect();
|
||||
} else {
|
||||
@ -499,7 +499,7 @@ class Signal extends Group {
|
||||
}
|
||||
|
||||
return {
|
||||
x: rect.x + drict * this.style.Signal.post.signalLampStandardWidth,
|
||||
x: rect.x + drict * this.style.Signal.post.standardWidth,
|
||||
y: rect.y - offsetY
|
||||
};
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ export default class EMouse extends Group {
|
||||
z: this.device.z+1,
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: this.device.model.position.x - this.device.style.StationControl.stationControlDistance / 2 + this.device.style.StationControl.stationOffset.x,
|
||||
y: this.device.model.position.y + this.device.style.StationControl.stationOffset.y + this.device.style.StationControl.stationControlmodeR + this.device.style.nameDistance-40,
|
||||
x: this.device.model.position.x - this.device.style.StationControl.lamp.distance / 2 + this.device.style.StationControl.lamp.offset.x,
|
||||
y: this.device.model.position.y + this.device.style.StationControl.lamp.offset.y + this.device.style.StationControl.lamp.radiusR + this.device.style.nameDistance-40,
|
||||
fontWeight: this.device.style.StationControl.mouseOverStyle.fontWeight,
|
||||
fontSize: this.device.style.StationControl.mouseOverStyle.fontSize,
|
||||
fontFamily: this.device.style.StationControl.mouseOverStyle.fontFormat,
|
||||
|
@ -33,12 +33,12 @@ export default class ESingleControl extends Group {
|
||||
shape: {
|
||||
cx: model.point.x,
|
||||
cy: model.point.y,
|
||||
r: model.style.StationControl.stationControlmodeR
|
||||
r: model.style.StationControl.lamp.radiusR
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0.5,
|
||||
fill: model.style.StationControl.stationControlGrayColor,
|
||||
stroke: model.style.StationControl.stationControlGrayColor
|
||||
fill: model.style.StationControl.grayColor,
|
||||
stroke: model.style.StationControl.grayColor
|
||||
}
|
||||
});
|
||||
|
||||
@ -50,7 +50,7 @@ export default class ESingleControl extends Group {
|
||||
position: [0, 0],
|
||||
style: {
|
||||
x: model.point.x,
|
||||
y: model.point.y + model.style.StationControl.stationControlmodeR + model.style.nameDistance,
|
||||
y: model.point.y + model.style.StationControl.lamp.radiusR + model.style.nameDistance,
|
||||
fontWeight: model.style.StationControl.text.fontWeight,
|
||||
fontSize: model.style.StationControl.text.fontSize,
|
||||
fontFamily: model.style.StationControl.text.fontFormat,
|
||||
|
@ -31,8 +31,8 @@ export default class StationControl extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.position.x - this.style.StationControl.stationControlDistance * 3 / 2 + this.style.StationControl.stationOffset.x,
|
||||
y: model.position.y + this.style.StationControl.stationOffset.y
|
||||
x: model.position.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
||||
},
|
||||
context: model.jjzkContent,
|
||||
pop: false
|
||||
@ -44,8 +44,8 @@ export default class StationControl extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.position.x - this.style.StationControl.stationControlDistance / 2 + this.style.StationControl.stationOffset.x,
|
||||
y: model.position.y + this.style.StationControl.stationOffset.y
|
||||
x: model.position.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
|
||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
||||
},
|
||||
context: model.zokContent,
|
||||
pop: false
|
||||
@ -57,8 +57,8 @@ export default class StationControl extends Group {
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
point: {
|
||||
x: model.position.x + this.style.StationControl.stationControlDistance / 2 + this.style.StationControl.stationOffset.x,
|
||||
y: model.position.y + this.style.StationControl.stationOffset.y
|
||||
x: model.position.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
|
||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
||||
},
|
||||
context: model.zakContent,
|
||||
pop: false
|
||||
@ -76,8 +76,8 @@ export default class StationControl extends Group {
|
||||
pop: false
|
||||
});
|
||||
// 箭头
|
||||
if (this.style.StationControl.arrowsShow) {
|
||||
const point = arrows(this.model.position.x, this.model.position.y + this.style.StationControl.stationControlmodeR / 2, this.style.StationControl.stationControlDistance / 6, this.style.StationControl.stationControlmodeR * 0.8);
|
||||
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);
|
||||
this.arrowsControl = new EArrow({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -85,9 +85,9 @@ export default class StationControl extends Group {
|
||||
count: this.count,
|
||||
drict: 1,
|
||||
point: point,
|
||||
x: model.position.x + this.style.StationControl.stationOffset.x,
|
||||
y: model.position.y + this.style.StationControl.stationControlmodeR / 2 + this.style.StationControl.stationOffset.y,
|
||||
fill: this.style.StationControl.stationControlGrayColor,
|
||||
x: model.position.x + this.style.StationControl.lamp.offset.x,
|
||||
y: model.position.y + this.style.StationControl.lamp.radiusR / 2 + this.style.StationControl.lamp.offset.y,
|
||||
fill: this.style.StationControl.lamp.grayColor,
|
||||
lineWidth: 1,
|
||||
stroke: this.style.sidelineColor
|
||||
});
|
||||
@ -95,7 +95,7 @@ export default class StationControl extends Group {
|
||||
}
|
||||
this.add(this.substationControl);
|
||||
this.add(this.centerControl);
|
||||
if (this.style.StationControl.singleControlNum == 3) {
|
||||
if (this.style.StationControl.lamp.count == 3) {
|
||||
this.add(this.emergencyControl);
|
||||
} else if (this.style.StationControl.singleControlNum == 4) {
|
||||
this.add(this.emergencyControl);
|
||||
@ -108,24 +108,24 @@ export default class StationControl extends Group {
|
||||
this.model = model;
|
||||
switch (model.status) {
|
||||
case '00': // 无状态
|
||||
this.emergencyControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.substationControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.centerControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
break;
|
||||
case '01': // 中控
|
||||
this.emergencyControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.substationControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.centerControl.setColor(this.style.StationControl.stationControlGreenColor);
|
||||
this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
this.centerControl.setColor(this.style.StationControl.lamp.greenColor);
|
||||
break;
|
||||
case '02': // 站控
|
||||
this.emergencyControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.substationControl.setColor(this.style.StationControl.stationControlYellowColor);
|
||||
this.centerControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
this.substationControl.setColor(this.style.StationControl.lamp.yellowColor);
|
||||
this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
break;
|
||||
case '03': // 紧急站控
|
||||
this.emergencyControl.setColor(this.style.StationControl.stationControlRedColor);
|
||||
this.substationControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.centerControl.setColor(this.style.StationControl.stationControlGrayColor);
|
||||
this.emergencyControl.setColor(this.style.StationControl.lamp.redColor);
|
||||
this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ class StationStand extends Group {
|
||||
/** 自动换端*/
|
||||
autoChangeEnds() {
|
||||
this.reentry.show();
|
||||
this.reentry.setColor(this.style.StationStand.reentry.AutoChangeEndsColor);
|
||||
this.reentry.setColor(this.style.StationStand.reentry.autoChangeEndsColor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
|
@ -50,7 +50,7 @@ class ESwName extends Group {
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
lineDash: [3, 3],
|
||||
stroke: style.Switch.text.switchTextBorderColor,
|
||||
stroke: style.Switch.text.borderColor,
|
||||
fill: style.transparentColor
|
||||
}
|
||||
});
|
||||
|
@ -42,7 +42,7 @@ export default class Switch extends Group {
|
||||
|
||||
let halfWidth = style.Section.line.width / 2;
|
||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth*2 + 0.8;
|
||||
const swPadding = style.Switch.core.switchLen;
|
||||
const swPadding = style.Switch.core.legnth;
|
||||
const directx = this.triangle.drictx;
|
||||
const directy = this.triangle.dricty;
|
||||
const direct = -this.triangle.drictx * this.triangle.dricty;
|
||||
@ -121,8 +121,8 @@ export default class Switch extends Group {
|
||||
|
||||
const arrowTextX = model.intersection.x + 10;
|
||||
const arrowTextY = model.intersection.y + 15;
|
||||
const nameTextX = model.namePosition.x + model.intersection.x + this.triangle.drictx * (style.Section.line.width * 3 + style.Switch.text.switchNameDistance) * this.triangle.getCotRate();
|
||||
const nameTextY = model.namePosition.y + model.intersection.y + this.triangle.dricty * (style.Switch.text.switchNameDistance);
|
||||
const nameTextX = model.namePosition.x + model.intersection.x + this.triangle.drictx * (style.Section.line.width * 3 + style.Switch.text.distance) * this.triangle.getCotRate();
|
||||
const nameTextY = model.namePosition.y + model.intersection.y + this.triangle.dricty * (style.Switch.text.distance);
|
||||
this.name = new ESwName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -148,13 +148,13 @@ export default class Switch extends Group {
|
||||
nameTextAnimation() {
|
||||
this.name.getNameText().animateStyle(true)
|
||||
.when(0, { textFill: this.style.backgroundColor })
|
||||
.when(1000, { textFill: this.style.Switch.text.switchTextLossColor })
|
||||
.when(1000, { textFill: this.style.Switch.text.lossColor })
|
||||
.when(2000, { textFill: this.style.backgroundColor })
|
||||
.start();
|
||||
|
||||
this.name.getTextRect().animateStyle(true)
|
||||
.when(0, { textFill: this.style.backgroundColor })
|
||||
.when(1000, { textFill: this.style.Switch.text.switchTextBorderColor })
|
||||
.when(1000, { textFill: this.style.Switch.text.borderColor })
|
||||
.when(2000, { textFill: this.style.backgroundColor })
|
||||
.start();
|
||||
}
|
||||
@ -205,7 +205,7 @@ export default class Switch extends Group {
|
||||
this.setSwitchCoreInvisible(true);
|
||||
this.locShelter.show();
|
||||
this.relocShelter.hide();
|
||||
this.setTextColor(this.style.Switch.text.switchTextLocateColor);
|
||||
this.setTextColor(this.style.Switch.text.locateColor);
|
||||
}
|
||||
|
||||
/** 反位*/
|
||||
@ -214,7 +214,7 @@ export default class Switch extends Group {
|
||||
this.setSwitchCoreInvisible(true);
|
||||
this.locShelter.hide();
|
||||
this.relocShelter.show();
|
||||
this.setTextColor(this.style.Switch.text.switchInversionColor);
|
||||
this.setTextColor(this.style.Switch.text.inversionColor);
|
||||
this.setSectionState(this.relocShelter.getSection(), 'fill', this.model.sectionAstatus);
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ export default class Switch extends Group {
|
||||
this.locShelter.hide();
|
||||
this.relocShelter.hide();
|
||||
this.setSwitchCoreInvisible(false);
|
||||
this.setTextColor(this.style.Switch.text.switchTextLossColor);
|
||||
this.setTextColor(this.style.Switch.text.lossColor);
|
||||
nameFlicker && this.nameTextAnimation();
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ export default class Switch extends Group {
|
||||
|
||||
/** 单锁*/
|
||||
setMonolock() {
|
||||
this.setTextColor(this.style.Switch.switchMonolockColor);
|
||||
this.setTextColor(this.style.Switch.monolockColor);
|
||||
}
|
||||
|
||||
/** 封锁 */
|
||||
|
Loading…
Reference in New Issue
Block a user