|
@@ -157,7 +157,7 @@ export const help = {
|
|
|
},
|
|
|
getRealDistance(p1, p2) {
|
|
|
return Math.round(
|
|
|
- (mathUtil.getDistance(p1, p2) * coordinate.res * 100) / coordinate.ratio
|
|
|
+ (mathUtil.getDistance(p1, p2) * coordinate.res * 1000) / coordinate.ratio
|
|
|
);
|
|
|
},
|
|
|
getPerpendicularPoint(p1, p2, p3, d) {
|
|
@@ -198,6 +198,7 @@ export const help = {
|
|
|
const vline = mathUtil.getVerticalLineByDistance(start, end, fontSize);
|
|
|
const center = mathUtil.lineCenter(vline[0], vline[1]);
|
|
|
// console.log(center, start, end);
|
|
|
+
|
|
|
ctx.save();
|
|
|
ctx.translate(center.x, center.y);
|
|
|
ctx.rotate((angle * Math.PI) / 180);
|
|
@@ -657,6 +658,8 @@ export default class Draw {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ console.log(edgeVector);
|
|
|
+ edgeVector.style = VectorStyle.SingleSolidLine;
|
|
|
help.drawStyleLine(
|
|
|
ctx,
|
|
|
points,
|
|
@@ -936,7 +939,7 @@ export default class Draw {
|
|
|
this.drawPoint(vector);
|
|
|
}
|
|
|
|
|
|
- drawLineArrow(line, doubleArrow = false) {
|
|
|
+ drawLineArrow(line, doubleArrow = false, len = 20) {
|
|
|
const ctx = this.context;
|
|
|
const [start, end] = line;
|
|
|
const dires = doubleArrow
|
|
@@ -948,7 +951,7 @@ export default class Draw {
|
|
|
|
|
|
ctx.save();
|
|
|
for (let [start, end] of dires) {
|
|
|
- const lines = mathUtil.getArrow(start, end);
|
|
|
+ const lines = mathUtil.getArrow(start, end, len);
|
|
|
ctx.moveTo(lines[0].x, lines[0].y);
|
|
|
ctx.lineTo(lines[1].x, lines[1].y);
|
|
|
ctx.lineTo(lines[2].x, lines[2].y);
|
|
@@ -1525,7 +1528,7 @@ export default class Draw {
|
|
|
VectorCategory.Line.LocationLineByBasePoint,
|
|
|
].includes(vector.category)
|
|
|
) {
|
|
|
- this.drawLineArrow([start, end], true);
|
|
|
+ this.drawLineArrow([start, end], true, 10);
|
|
|
}
|
|
|
break;
|
|
|
}
|