|
@@ -206,8 +206,8 @@ export const help = {
|
|
|
|
|
|
ctx.font = `${fontSize}px Microsoft YaHei`;
|
|
|
const textCenter = help.getTextCenter(ctx, text);
|
|
|
- ctx.fillStyle = style.backColor;
|
|
|
if (!isScreenStyle()) {
|
|
|
+ // ctx.fillStyle = style.backColor;
|
|
|
// const padding = style.padding;
|
|
|
// help.roundRect(
|
|
|
// ctx,
|
|
@@ -219,8 +219,17 @@ export const help = {
|
|
|
// );
|
|
|
// ctx.fill();
|
|
|
}
|
|
|
- ctx.fillStyle = style.fillColor;
|
|
|
- ctx.fillText(text, -textCenter.x, -textCenter.y);
|
|
|
+ ctx.lineWidth = 8;
|
|
|
+ if (!style.fillStyle) {
|
|
|
+ ctx.strokeStyle = "#fff";
|
|
|
+ ctx.strokeText(text, -textCenter.x, -textCenter.y);
|
|
|
+ ctx.fillStyle = "#000";
|
|
|
+ ctx.fillText(text, -textCenter.x, -textCenter.y);
|
|
|
+ console.error("????");
|
|
|
+ } else {
|
|
|
+ ctx.fillStyle = style.fillColor;
|
|
|
+ ctx.fillText(text, -textCenter.x, -textCenter.y);
|
|
|
+ }
|
|
|
ctx.restore();
|
|
|
},
|
|
|
isTriangleClockwise(p1, p2, p3) {
|
|
@@ -601,10 +610,8 @@ export default class Draw {
|
|
|
const [style] = help.setVectorStyle(this.context, vector, ["NormalLine"]);
|
|
|
help.drawStyleLine(this.context, [start, end]);
|
|
|
help.drawLineText(this.context, start, end, width, {
|
|
|
- fillColor: isScreenStyle() ? "#000" : "#fff",
|
|
|
padding: 6,
|
|
|
fontSize: 12,
|
|
|
- backColor: style.strokeStyle,
|
|
|
});
|
|
|
this.drawLineArrow([start, end], true);
|
|
|
});
|
|
@@ -685,6 +692,7 @@ export default class Draw {
|
|
|
targetLine[1] = temp;
|
|
|
}
|
|
|
|
|
|
+ console.log(edgeVector.roadSide.width);
|
|
|
const tstart = mathUtil.translate(
|
|
|
targetLine[0],
|
|
|
targetLine[1],
|
|
@@ -698,16 +706,16 @@ export default class Draw {
|
|
|
edgeVector.roadSide.width + 24
|
|
|
);
|
|
|
|
|
|
+ // this.drawPoint(tstart);
|
|
|
+ // this.drawPoint(tend);
|
|
|
help.drawLineText(
|
|
|
ctx,
|
|
|
coordinate.getScreenXY(tstart),
|
|
|
coordinate.getScreenXY(tend),
|
|
|
edgeVector.roadSide.width * 10,
|
|
|
{
|
|
|
- fillColor: isScreenStyle() ? "#000" : "#fff",
|
|
|
padding: 6,
|
|
|
fontSize: 12,
|
|
|
- backColor: style.strokeStyle,
|
|
|
}
|
|
|
);
|
|
|
}
|