调整:代码调整

This commit is contained in:
fan 2019-08-02 14:38:05 +08:00
parent 0abe6e61e6
commit 02ba15964c
3 changed files with 39 additions and 29 deletions

View File

@ -338,6 +338,7 @@ class SkinStyle extends defaultStyle {
fontWeight: 'normal', fontWeight: 'normal',
textAlign: 'middle', textAlign: 'middle',
textVerticalAlign: 'top', textVerticalAlign: 'top',
textColor: '#000000',
arcColor: '#00FFFF' arcColor: '#00FFFF'
} }
}; };

View File

@ -165,15 +165,15 @@ class SkinStyle extends defaultStyle {
}, },
stand: { // 站台 stand: { // 站台
headFontSize: 10, // 站台首端字体大小 headFontSize: 10, // 站台首端字体大小
spareColor: '#606060', // 站台空闲颜色 spareColor: '#808080', // 站台空闲颜色
stopColor: '#FEFE00', // 站台列车停站颜色 stopColor: '#FFF000', // 站台列车停站颜色
jumpStopColor: '#9A99FF', // 站台跳停颜色 jumpStopColor: '#9A99FF', // 站台跳停颜色
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色 designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
}, },
standEmergent: { // 紧急关闭 standEmergent: { // 紧急关闭
mergentR: 4, // 站台紧急关闭半径 mergentR: 4, // 站台紧急关闭半径
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量 offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
closeColor: '#F61107' // 站台紧急关闭颜色 closeColor: '#C00808' // 站台紧急关闭颜色
}, },
reentry: { // 站台折返策略 reentry: { // 站台折返策略
direction: 0, // 折返方向 direction: 0, // 折返方向
@ -182,23 +182,32 @@ class SkinStyle extends defaultStyle {
AutoChangeEndsColor: '#0BF400' // 站台自动换端 AutoChangeEndsColor: '#0BF400' // 站台自动换端
}, },
detainCar: { // 扣车 detainCar: { // 扣车
text: 'H', // 扣车显示内容 text: '', // 扣车显示内容
direction: -1, // 扣车方向 direction: -1, // 扣车方向
offset: {x: -8, y: -6}, // 扣车偏移量 offset: {x: -8, y: -2}, // 扣车偏移量
trainColor: '#E4EF50', // 车站扣车颜色 trainColor: '#FFFF00', // 车站扣车颜色
centerTrainColor: '#FFFFFF', // 中心扣车颜色 centerTrainColor: '#C0C0C0', // 中心扣车颜色
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色 andCenterTrainColor: '#C00808', // 车站+中心扣车颜色
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色 detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
}, },
jump: {
text: '跳', // 停跳显示内容
direction: -1, // 停跳方向
offset: {x: -8, y: 4},
textColor: '#0000FF', // 停跳文字颜色
arcColor: '#0000FF', // 停跳圆圈颜色
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
r: 8 // 圆半径大小
},
stopTime: { // 停站时间 stopTime: { // 停站时间
direction: 1, // 运行时间方向 direction: 1, // 运行时间方向
offset: {x: -8, y: 26}, // 运行时间偏移量 offset: {x: -8, y: -4}, // 运行时间偏移量
textColor: '#FFFFFF' // 停站时间字体颜色 textColor: '#C0C0C0' // 停站时间字体颜色
}, },
level: { // 运行等级 level: { // 运行等级
direction: 1, // 运行等级方向 direction: 1, // 运行等级方向
offset: {x: -8, y: 6}, // 运行等级偏移量 offset: {x: -8, y: 30}, // 运行等级偏移量
textColor: '#FFFFFF' // 停站等级字体颜色 textColor: '#FFF000' // 停站等级字体颜色
} }
}; };
this[deviceType.StationControl] = { this[deviceType.StationControl] = {

View File

@ -130,23 +130,23 @@ class StationStand extends Group {
name: model.intervalRunTime || '5' name: model.intervalRunTime || '5'
}); });
/** 列车停跳 */ /** 列车停跳 */
const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height; // const jumpD = style.StationStand.jump.direction ? model.height - distance: -style.StationStand.safetyDoor.height;
const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD; // const jumpH = drict > 0 ? style.StationStand.standEmergent.mergentR : style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.distance + jumpD;
const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2); // const jumpX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2);
const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH; // const jumpY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y) + drict * jumpH;
const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2 - style.StationStand.common.textFontSize/2); // const jumpCX = model.position.x - (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.x - model.width / 2 - style.StationStand.common.textFontSize/2);
const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y + style.StationStand.common.textFontSize / 2) + drict * jumpH; // const jumpCY = model.position.y + (style.StationStand.jump.direction || drict) * (style.StationStand.jump.offset.y + style.StationStand.common.textFontSize / 2) + drict * jumpH;
this.jump = new EJump({ // this.jump = new EJump({
zlevel: this.zlevel, // zlevel: this.zlevel,
z: this.z + 1, // z: this.z + 1,
style: style, // style: style,
x: jumpX, // x: jumpX,
y: jumpY, // y: jumpY,
cx: jumpCX, // cx: jumpCX,
cy: jumpCY, // cy: jumpCY,
textAlign: 'middle', // textAlign: 'middle',
textVerticalAlign: 'top' // textVerticalAlign: 'top'
}); // });
this.add(this.safeDoor); this.add(this.safeDoor);
this.add(this.safeStand); this.add(this.safeStand);