소스 검색

Fix bug that prevented the point from being drawn

Lucas de Souza 5 년 전
부모
커밋
270cb95c92
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/app/components/point.js

+ 3 - 2
src/app/components/point.js

@@ -29,8 +29,8 @@ export const point = (function() {
       this.points[0] = pos.x;
       this.points[0] = pos.x;
       this.points[1] = pos.y;
       this.points[1] = pos.y;
       let p = this.points.slice();
       let p = this.points.slice();
-      this._drawPoint(p[0], p[1], true);
-      this._clearState();
+      this.drawPoint(p[0], p[1], true);
+      state = undefined;
       App.clearSelectedTool();
       App.clearSelectedTool();
       App.setStatus("");
       App.setStatus("");
     }
     }
@@ -119,6 +119,7 @@ export const point = (function() {
     icon: "point",
     icon: "point",
     click: _click,
     click: _click,
     draw: _draw,
     draw: _draw,
+    drawPoint: _drawPoint,
     points: points
     points: points
   };
   };