|
@@ -202,7 +202,6 @@ export default class MovePoint {
|
|
line = mathUtil.createLine3(lineGeometry, position);
|
|
line = mathUtil.createLine3(lineGeometry, position);
|
|
let join = mathUtil.getIntersectionPoint(line, otherLine);
|
|
let join = mathUtil.getIntersectionPoint(line, otherLine);
|
|
mathUtil.clonePoint(otherPoint, join);
|
|
mathUtil.clonePoint(otherPoint, join);
|
|
- mathUtil.clonePoint(basePoint, position);
|
|
|
|
} else if (
|
|
} else if (
|
|
line.getCategory() == VectorCategory.Line.ExtendedPositionLine
|
|
line.getCategory() == VectorCategory.Line.ExtendedPositionLine
|
|
) {
|
|
) {
|
|
@@ -211,45 +210,50 @@ export default class MovePoint {
|
|
let otherLine = mathUtil.createLine3(lineGeometry, otherPoint);
|
|
let otherLine = mathUtil.createLine3(lineGeometry, otherPoint);
|
|
let join = mathUtil.getJoinLinePoint(position, otherLine);
|
|
let join = mathUtil.getJoinLinePoint(position, otherLine);
|
|
mathUtil.clonePoint(otherPoint, join);
|
|
mathUtil.clonePoint(otherPoint, join);
|
|
- mathUtil.clonePoint(basePoint, position);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ mathUtil.clonePoint(basePoint, position);
|
|
}
|
|
}
|
|
|
|
|
|
updateFixPoint(position, fixPointId) {
|
|
updateFixPoint(position, fixPointId) {
|
|
let fixPoint = dataService.getPoint(fixPointId);
|
|
let fixPoint = dataService.getPoint(fixPointId);
|
|
- let basePoint = dataService.getPoint(fixPoint.linkedBasePointId);
|
|
|
|
|
|
+
|
|
let baseLine = dataService.getLine(Settings.baseLineId);
|
|
let baseLine = dataService.getLine(Settings.baseLineId);
|
|
- let startPoint = dataService.getPoint(baseLine.startId);
|
|
|
|
- let endPoint = dataService.getPoint(baseLine.endId);
|
|
|
|
|
|
+ if (baseLine) {
|
|
|
|
+ let startPoint = dataService.getPoint(baseLine.startId);
|
|
|
|
+ let endPoint = dataService.getPoint(baseLine.endId);
|
|
|
|
|
|
- let baseLineGeometry = mathUtil.createLine1(startPoint, endPoint);
|
|
|
|
- let vLine = mathUtil.getVerticalLine(baseLineGeometry, position);
|
|
|
|
- let join = mathUtil.getIntersectionPoint(baseLineGeometry, vLine);
|
|
|
|
|
|
+ let baseLineGeometry = mathUtil.createLine1(startPoint, endPoint);
|
|
|
|
+ let vLine = mathUtil.getVerticalLine(baseLineGeometry, position);
|
|
|
|
+ let join = mathUtil.getIntersectionPoint(baseLineGeometry, vLine);
|
|
|
|
|
|
- let parent = fixPoint.getParent();
|
|
|
|
- for (let key in parent) {
|
|
|
|
- let line = dataService.getLine(key);
|
|
|
|
- if (line.getCategory() == VectorCategory.Line.LocationLineByFixPoint) {
|
|
|
|
- let otherPointId = line.getOtherPointId(fixPointId);
|
|
|
|
- let otherPoint = dataService.getPoint(otherPointId);
|
|
|
|
- mathUtil.clonePoint(otherPoint, join);
|
|
|
|
- } else if (line.getCategory() == VectorCategory.Line.GuideLocationLine) {
|
|
|
|
- let otherPointId = line.getOtherPointId(fixPointId);
|
|
|
|
- let otherPoint = dataService.getPoint(otherPointId);
|
|
|
|
- let line2 = mathUtil.createLine3(baseLineGeometry, otherPoint);
|
|
|
|
- join = mathUtil.getIntersectionPoint(line2, vLine);
|
|
|
|
- mathUtil.clonePoint(otherPoint, join);
|
|
|
|
- } else if (
|
|
|
|
- line.getCategory() == VectorCategory.Line.ExtendedPositionLine
|
|
|
|
- ) {
|
|
|
|
- let otherPointId = line.getOtherPointId(fixPointId);
|
|
|
|
- let otherPoint = dataService.getPoint(otherPointId);
|
|
|
|
- let line2 = mathUtil.createLine3(baseLineGeometry, fixPoint);
|
|
|
|
- join = mathUtil.getJoinLinePoint(otherPoint, line2);
|
|
|
|
- mathUtil.clonePoint(otherPoint, join);
|
|
|
|
|
|
+ let parent = fixPoint.getParent();
|
|
|
|
+ for (let key in parent) {
|
|
|
|
+ let line = dataService.getLine(key);
|
|
|
|
+ if (line.getCategory() == VectorCategory.Line.LocationLineByFixPoint) {
|
|
|
|
+ let otherPointId = line.getOtherPointId(fixPointId);
|
|
|
|
+ let otherPoint = dataService.getPoint(otherPointId);
|
|
|
|
+ mathUtil.clonePoint(otherPoint, join);
|
|
|
|
+ } else if (
|
|
|
|
+ line.getCategory() == VectorCategory.Line.GuideLocationLine
|
|
|
|
+ ) {
|
|
|
|
+ let otherPointId = line.getOtherPointId(fixPointId);
|
|
|
|
+ let otherPoint = dataService.getPoint(otherPointId);
|
|
|
|
+ let line2 = mathUtil.createLine3(baseLineGeometry, otherPoint);
|
|
|
|
+ join = mathUtil.getIntersectionPoint(line2, vLine);
|
|
|
|
+ mathUtil.clonePoint(otherPoint, join);
|
|
|
|
+ } else if (
|
|
|
|
+ line.getCategory() == VectorCategory.Line.ExtendedPositionLine
|
|
|
|
+ ) {
|
|
|
|
+ let otherPointId = line.getOtherPointId(fixPointId);
|
|
|
|
+ let otherPoint = dataService.getPoint(otherPointId);
|
|
|
|
+ let line2 = mathUtil.createLine3(baseLineGeometry, fixPoint);
|
|
|
|
+ join = mathUtil.getJoinLinePoint(otherPoint, line2);
|
|
|
|
+ mathUtil.clonePoint(otherPoint, join);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
mathUtil.clonePoint(fixPoint, position);
|
|
mathUtil.clonePoint(fixPoint, position);
|
|
moveText.moveFullText(position, fixPoint.linkedTextId);
|
|
moveText.moveFullText(position, fixPoint.linkedTextId);
|
|
}
|
|
}
|