31 lines
977 B
JavaScript
31 lines
977 B
JavaScript
import { JlGraphic } from 'jl-graphic';
|
|
|
|
var SwitchMachineType;
|
|
(function (SwitchMachineType) {
|
|
SwitchMachineType[SwitchMachineType["Unknown"] = 0] = "Unknown";
|
|
SwitchMachineType[SwitchMachineType["ZDJ9_Single"] = 1] = "ZDJ9_Single";
|
|
SwitchMachineType[SwitchMachineType["ZDJ9_Double"] = 2] = "ZDJ9_Double";
|
|
})(SwitchMachineType || (SwitchMachineType = {}));
|
|
class Turnout extends JlGraphic {
|
|
static Type = 'Turnout';
|
|
doRepaint() {
|
|
console.log(111);
|
|
}
|
|
get datas() {
|
|
return this.getDatas();
|
|
}
|
|
getGraphicOfPort(port) {
|
|
return this.relationManage
|
|
.getRelationsOfGraphic(this)
|
|
.filter((relation) => relation.getRelationParam(this).getParam() === port)
|
|
.map((relation) => {
|
|
return relation.getOtherGraphic(this);
|
|
});
|
|
}
|
|
getPortPoints() {
|
|
return [this.datas.pointA, this.datas.pointB, this.datas.pointC];
|
|
}
|
|
}
|
|
|
|
export { SwitchMachineType, Turnout };
|