xushiting 2 年之前
父節點
當前提交
459bde8cf4
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 5 0
      src/graphic/Geometry/Circle.js
  2. 1 0
      src/graphic/Geometry/Line.js

+ 5 - 0
src/graphic/Geometry/Circle.js

@@ -9,6 +9,7 @@ export default class Circle extends Geometry {
     super();
     this.radius = 5;
     this.center = null;
+    this.color = "blue";
     this.geoType = VectorType.Circle;
     this.setId(vectorId);
 
@@ -27,4 +28,8 @@ export default class Circle extends Geometry {
       this.center.y = center.y;
     }
   }
+
+  setColor(value) {
+    this.color = value;
+  }
 }

+ 1 - 0
src/graphic/Geometry/Line.js

@@ -9,6 +9,7 @@ export default class Line extends Geometry {
     this.startId = startId;
     this.endId = endId;
     this.category = null;
+    this.arrowColor = null; //箭头类型会用到
     this.geoType = VectorType.Line;
     this.setId(vectorId);
   }