|
@@ -3,6 +3,8 @@ import { ELEMENTS_CLASS } from "../../../core/enums/elements-class-enum";
|
|
|
import { label as Label } from "../../../component-registry/label";
|
|
|
import { app as App } from "../../../app";
|
|
|
import { PointModel } from "../models/point-model";
|
|
|
+import { DrawerAggragator } from "../../../core/drawers/drawer-aggregator";
|
|
|
+
|
|
|
const HOVER_STYLE = {
|
|
|
fill: "#9bc364",
|
|
|
strokeWidth: 2,
|
|
@@ -36,16 +38,16 @@ export class PointDrawer extends Drawer {
|
|
|
}
|
|
|
draw() {
|
|
|
if (this.state == undefined) {
|
|
|
- this.state = this.states[0];
|
|
|
+ super.setState(this.states[0]);
|
|
|
App.setStatus("Selecione o centro do Ponto");
|
|
|
return;
|
|
|
} else if (this.state == this.states[0]) {
|
|
|
let pos = App.pos();
|
|
|
this.point = new PointModel(pos.x, pos.y);
|
|
|
this.setPoint(this.point, true);
|
|
|
- // super.addAggregator(new DrawerAggregator(this, this.point));
|
|
|
+ super.addAggregator(new DrawerAggragator(this, this.point));
|
|
|
super.draw(this.group);
|
|
|
- this.clear();
|
|
|
+ super.setState(this.states[0]);
|
|
|
return this.group;
|
|
|
}
|
|
|
}
|
|
@@ -101,4 +103,5 @@ export class PointDrawer extends Drawer {
|
|
|
App.stage.draw();
|
|
|
});
|
|
|
}
|
|
|
+ update() {}
|
|
|
}
|