Explorar o código

初始化Line问题修改

bill %!s(int64=2) %!d(string=hai) anos
pai
achega
7a6f88b6b0
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/graphic/Geometry/Line.js

+ 2 - 2
src/graphic/Geometry/Line.js

@@ -6,8 +6,8 @@ import Constant from "../Constant.js";
 export default class Line extends Geometry {
   constructor(start, end, vectorId) {
     super();
-    this.start = null;
-    this.end = null;
+    this.start = { x: 0, y: 0 };
+    this.end = { x: 0, y: 0 };
     this.geoType = VectorType.Line;
     this.setId(vectorId);