فهرست منبع

初始化Line问题修改

bill 2 سال پیش
والد
کامیت
7a6f88b6b0
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  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);