|
@@ -610,14 +610,29 @@ export default class Draw {
|
|
|
}
|
|
|
|
|
|
drawPoint(vector) {
|
|
|
+ if (vector.category === VectorCategory.Point.TestBasePoint) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
const pt = coordinate.getScreenXY({ x: vector.x, y: vector.y });
|
|
|
const ctx = this.context;
|
|
|
- const [style] = help.setVectorStyle(
|
|
|
+ const [style, attr] = help.setVectorStyle(
|
|
|
ctx,
|
|
|
vector,
|
|
|
[vector.category, vector.geoType, "Point"]
|
|
|
|
|
|
);
|
|
|
+ if (vector.category === VectorCategory.Point.NormalPoint) {
|
|
|
+ const lineid = Object.keys(vector.parent)[0]
|
|
|
+ let line, style
|
|
|
+ if (!(lineid && (line = dataService.getLine(lineid)))) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const [_, attr] = help.getVectorStyle(line)
|
|
|
+ if (!attr) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (vector.color) {
|
|
|
ctx.strokeStyle = vector.color;
|
|
|
}
|
|
@@ -631,6 +646,7 @@ export default class Draw {
|
|
|
ctx.fill();
|
|
|
ctx.restore();
|
|
|
}
|
|
|
+
|
|
|
draw(style)
|
|
|
if (style.out) {
|
|
|
draw(style.out)
|
|
@@ -750,11 +766,13 @@ export default class Draw {
|
|
|
|
|
|
const drawPoints = () => {
|
|
|
// if (attr) {
|
|
|
+ console.log("???")
|
|
|
this.drawPoint(dataService.getPoint(vector.startId))
|
|
|
this.drawPoint(dataService.getPoint(vector.endId))
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
+ console.log(vector.category)
|
|
|
switch (vector.category) {
|
|
|
case VectorCategory.Line.ArrowLine:
|
|
|
this.drawArrow(vector);
|
|
@@ -767,6 +785,7 @@ export default class Draw {
|
|
|
case VectorCategory.Line.PositionLine:
|
|
|
this.drawLineText(vector, style.text)
|
|
|
break;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|