修改bug
This commit is contained in:
parent
165362dfcb
commit
a02a948f17
@ -308,7 +308,7 @@ class SkinStyle extends defaultStyle {
|
|||||||
monolockColor: '#870E10' // 道岔单锁颜色
|
monolockColor: '#870E10' // 道岔单锁颜色
|
||||||
},
|
},
|
||||||
core: {
|
core: {
|
||||||
legnth: 6 // 道岔单边长度
|
length: 6 // 道岔单边长度
|
||||||
},
|
},
|
||||||
monolock: { // 道岔单锁配置
|
monolock: { // 道岔单锁配置
|
||||||
locationColor: '#870E10', // 道岔单锁定位颜色 (红色)
|
locationColor: '#870E10', // 道岔单锁定位颜色 (红色)
|
||||||
|
@ -302,7 +302,7 @@ class SkinStyle extends defaultStyle {
|
|||||||
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
||||||
},
|
},
|
||||||
core: {
|
core: {
|
||||||
legnth: 6 // 道岔单边长度
|
length: 6 // 道岔单边长度
|
||||||
},
|
},
|
||||||
monolock: { // 道岔单锁配置
|
monolock: { // 道岔单锁配置
|
||||||
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||||
|
@ -281,7 +281,7 @@ class SkinStyle extends defaultStyle {
|
|||||||
monolockColor: '#870E10' // 道岔单锁颜色
|
monolockColor: '#870E10' // 道岔单锁颜色
|
||||||
},
|
},
|
||||||
core: {
|
core: {
|
||||||
legnth: 6 // 道岔单边长度
|
length: 6 // 道岔单边长度
|
||||||
},
|
},
|
||||||
block: { // 道岔封锁配置
|
block: { // 道岔封锁配置
|
||||||
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
nameBorderShow: true, // 道岔名称是否有包围框 显示
|
||||||
|
@ -213,6 +213,7 @@ class Jlmap {
|
|||||||
const sectionB = this.mapDevice[swch.sectionBCode];
|
const sectionB = this.mapDevice[swch.sectionBCode];
|
||||||
const sectionC = this.mapDevice[swch.sectionCCode];
|
const sectionC = this.mapDevice[swch.sectionCCode];
|
||||||
if (sectionA && sectionB && sectionC) {
|
if (sectionA && sectionB && sectionC) {
|
||||||
|
swch['cutOff'] = sectionA.cutOff;
|
||||||
swch['sectionAstatus'] = sectionA.status;
|
swch['sectionAstatus'] = sectionA.status;
|
||||||
swch['sectionBstatus'] = sectionB.status;
|
swch['sectionBstatus'] = sectionB.status;
|
||||||
swch['sectionCstatus'] = sectionC.status;
|
swch['sectionCstatus'] = sectionC.status;
|
||||||
|
@ -32,7 +32,7 @@ import JTriangle from '../../utils/JTriangle';
|
|||||||
// ctx.bezierCurveTo(shape[`cpx1`], shape[`cpy1`], shape[`cpx2`], shape[`cpy2`], shape[`x2`], shape[`y2`]);
|
// ctx.bezierCurveTo(shape[`cpx1`], shape[`cpy1`], shape[`cpx2`], shape[`cpy2`], shape[`x2`], shape[`y2`]);
|
||||||
// }
|
// }
|
||||||
// } else {
|
// } else {
|
||||||
// const swPadding = model.style.Switch.core.legnth; // 定位和反位时区段距离岔芯的距离
|
// const swPadding = model.style.Switch.core.length; // 定位和反位时区段距离岔芯的距离
|
||||||
// var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
// var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
||||||
// const beg = Object.assign({}, model.points[0]);
|
// const beg = Object.assign({}, model.points[0]);
|
||||||
// const end = Object.assign({}, model.points[model.points.length - 1]);
|
// 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 beg = Object.assign({}, model.points[0]);
|
||||||
// const end = Object.assign({}, model.points[model.points.length - 1]);
|
// const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||||
|
|
||||||
const swPadding = model.style.Switch.core.legnth; // 定位和反位时区段距离岔芯的距离
|
const swPadding = model.style.Switch.core.length; // 定位和反位时区段距离岔芯的距离
|
||||||
var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
|
||||||
const beg = Object.assign({}, model.points[0]);
|
const beg = Object.assign({}, model.points[0]);
|
||||||
const end = Object.assign({}, model.points[model.points.length - 1]);
|
const end = Object.assign({}, model.points[model.points.length - 1]);
|
||||||
|
@ -44,7 +44,7 @@ export default class Switch extends Group {
|
|||||||
|
|
||||||
let halfWidth = style.Section.line.width / 2;
|
let halfWidth = style.Section.line.width / 2;
|
||||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth*2 + 0.8;
|
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth*2 + 0.8;
|
||||||
const swPadding = style.Switch.core.legnth;
|
const swPadding = style.Switch.core.length;
|
||||||
const directx = this.triangle.drictx;
|
const directx = this.triangle.drictx;
|
||||||
const directy = this.triangle.dricty;
|
const directy = this.triangle.dricty;
|
||||||
const direct = -this.triangle.drictx * this.triangle.dricty;
|
const direct = -this.triangle.drictx * this.triangle.dricty;
|
||||||
@ -213,8 +213,10 @@ export default class Switch extends Group {
|
|||||||
this.setSwitchCoreColor(this.style.backgroundColor);
|
this.setSwitchCoreColor(this.style.backgroundColor);
|
||||||
this.name.getNameText().stopAnimation(false);
|
this.name.getNameText().stopAnimation(false);
|
||||||
this.swCore.stopAnimation(false);
|
this.swCore.stopAnimation(false);
|
||||||
|
if (!this.model.cutOff) {
|
||||||
this.relocShelter.stopAnimation(false);
|
this.relocShelter.stopAnimation(false);
|
||||||
this.relocShelter.hide();
|
this.relocShelter.hide();
|
||||||
|
}
|
||||||
this.releaseBackground.hide();
|
this.releaseBackground.hide();
|
||||||
this.setHasTextBorder(0);
|
this.setHasTextBorder(0);
|
||||||
}
|
}
|
||||||
@ -235,7 +237,7 @@ export default class Switch extends Group {
|
|||||||
this.locShelter.hide();
|
this.locShelter.hide();
|
||||||
this.relocShelter.show();
|
this.relocShelter.show();
|
||||||
this.setTextColor(this.style.Switch.text.inversionColor);
|
this.setTextColor(this.style.Switch.text.inversionColor);
|
||||||
this.setSectionState(this.relocShelter.getSection(), 'fill', this.model.sectionAstatus);
|
this.setSectionState(this.relocShelter.getSection(), 'fill', this.model);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 失去*/
|
/** 失去*/
|
||||||
@ -310,9 +312,20 @@ export default class Switch extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setSectionState(section, style, model) {
|
sectionCutOff(section) {
|
||||||
|
const lineWidth = this.style.Section.line.width + (this.model.sectionAstatus != '01' ? this.style.Section.line.beyondWidth : 0);
|
||||||
if (section) {
|
if (section) {
|
||||||
switch (model) {
|
section.animateStyle(true, [
|
||||||
|
{ time: 0, styles: { lineWidth: lineWidth } },
|
||||||
|
{ time: 1000, styles: { stroke: this.style.backgroundColor } },
|
||||||
|
{ time: 2000, styles: { lineWidth: lineWidth } }
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setSectionState(section, style, state) {
|
||||||
|
if (section) {
|
||||||
|
switch (state.sectionAstatus) {
|
||||||
case '00': break;
|
case '00': break;
|
||||||
case '01': /** 空闲*/
|
case '01': /** 空闲*/
|
||||||
section.setStyle(style, this.style.Section.line.spareColor);
|
section.setStyle(style, this.style.Section.line.spareColor);
|
||||||
@ -347,6 +360,10 @@ export default class Switch extends Group {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (state.cutOff && !section.animators.length ) {
|
||||||
|
this.sectionCutOff(section);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setLocateType(model) {
|
setLocateType(model) {
|
||||||
|
Loading…
Reference in New Issue
Block a user