道岔编辑修改

This commit is contained in:
joylink_zhaoerwei 2024-03-28 09:58:05 +08:00
parent dcd7f3322c
commit e964b8bf27

View File

@ -199,7 +199,9 @@ class DragMoveAbsorbablePoint extends AbsorbablePoint {
pointC: [C],
} = dragTarget.datas;
this.moveTarget = {
position: dragTarget.getGlobalPosition(),
position: dragTarget
.getGraphicApp()
.toCanvasCoordinates(dragTarget.getGlobalPosition()),
portPos: [
dragTarget.localToCanvasPoint(A),
dragTarget.localToCanvasPoint(B),
@ -234,7 +236,9 @@ class DragMoveAbsorbablePoint extends AbsorbablePoint {
} else {
if (this.moveTarget == undefined) {
this.moveTarget = {
position: dragTarget.getGlobalPosition(),
position: dragTarget
.getGraphicApp()
.toCanvasCoordinates(dragTarget.getGlobalPosition()),
portPos: [
dragTarget.localToCanvasPoint(dragTarget.getStartPoint()),
dragTarget.localToCanvasPoint(dragTarget.getEndPoint()),
@ -443,6 +447,9 @@ export class TurnoutPointsInteractionPlugin extends GraphicInteractionPlugin<Tur
tep = new TurnoutEditPlugin(turnout, { onEditPointCreate });
turnout.addAssistantAppend(tep);
}
tep.editPoints = [[], [], []];
tep.removeChildren();
tep.initEditPoints();
//tep.reset();
tep.showAll();
}