|
@@ -424,6 +424,14 @@ export const help = {
|
|
|
ctx.fill();
|
|
|
ctx.stroke();
|
|
|
ctx.restore();
|
|
|
+ // line.forEach((point) => {
|
|
|
+ // ctx.beginPath();
|
|
|
+ // ctx.fillStyle = "#000";
|
|
|
+ // ctx.arc(point.x, point.y, 10, 0, 2 * Math.PI);
|
|
|
+ // ctx.fill();
|
|
|
+ // ctx.closePath();
|
|
|
+ // console.log(point);
|
|
|
+ // });
|
|
|
|
|
|
const width = mathUtil.getDistance(line[0], line[3]);
|
|
|
const c1 = mathUtil.translate(line[0], line[3], line[0], width / 2);
|
|
@@ -684,10 +692,16 @@ export default class Draw {
|
|
|
vector.roadWidthTipsPos[0].start,
|
|
|
vector.roadWidthTipsPos[0].end,
|
|
|
];
|
|
|
+
|
|
|
+ const join = mathUtil.getIntersectionPoint(
|
|
|
+ mathUtil.createLine1(checkLine[0], checkLine[1]),
|
|
|
+ mathUtil.createLine1(targetLine[0], targetLine[1])
|
|
|
+ );
|
|
|
const isStartMax =
|
|
|
mathUtil.getDisForLineCoord(checkLine, targetLine[0]) >
|
|
|
mathUtil.getDisForLineCoord(checkLine, targetLine[1]);
|
|
|
|
|
|
+ // this.drawPoint(join);
|
|
|
if (!isStartMax) {
|
|
|
const temp = targetLine[0];
|
|
|
targetLine[0] = targetLine[1];
|
|
@@ -697,13 +711,13 @@ export default class Draw {
|
|
|
const tstart = mathUtil.translate(
|
|
|
targetLine[0],
|
|
|
targetLine[1],
|
|
|
- targetLine[1],
|
|
|
+ join,
|
|
|
help.getScreenDistance(edgeVector.roadSide.width * 1000)
|
|
|
);
|
|
|
const tend = mathUtil.translate(
|
|
|
targetLine[0],
|
|
|
targetLine[1],
|
|
|
- targetLine[1],
|
|
|
+ join,
|
|
|
help.getScreenDistance(edgeVector.roadSide.width * 1000) + 4
|
|
|
);
|
|
|
|
|
@@ -713,7 +727,7 @@ export default class Draw {
|
|
|
ctx,
|
|
|
coordinate.getScreenXY(tstart),
|
|
|
coordinate.getScreenXY(tend),
|
|
|
- edgeVector.roadSide.width * 10,
|
|
|
+ Math.round(edgeVector.roadSide.width * 1000),
|
|
|
{
|
|
|
padding: 6,
|
|
|
fontSize: 12,
|
|
@@ -1203,7 +1217,6 @@ export default class Draw {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- console.log(line);
|
|
|
if (line.category !== "ZebraCrossing") {
|
|
|
const [stylea, attr] = help.getVectorStyle(line, line.category);
|
|
|
style = {
|
|
@@ -1605,7 +1618,6 @@ export default class Draw {
|
|
|
case VectorCategory.Line.FreeMeasureLine:
|
|
|
case VectorCategory.Line.MeasureLine:
|
|
|
case VectorCategory.Line.PositionLine:
|
|
|
- console.log(vector);
|
|
|
this.drawLineText(vector, style.text);
|
|
|
|
|
|
if (
|