|
@@ -178,20 +178,26 @@ export class MiddlePointDrawer extends SelectableDrawer {
|
|
|
const pointB = aggregator.genericObject.pointB;
|
|
|
const pointC = aggregator.genericObject.pointC;
|
|
|
const coord = aggregator.genericObject.getMiddlePoint();
|
|
|
- pointC.bind(coord.posX, coord.posY);
|
|
|
aggregator.konvaObject.children[0].x(coord.posX);
|
|
|
aggregator.konvaObject.children[0].y(coord.posY - 20);
|
|
|
aggregator.konvaObject.children[1].points([
|
|
|
pointA.posX, pointA.posY,
|
|
|
pointB.posX, pointB.posY
|
|
|
]);
|
|
|
- console.log("aggregator-update", aggregator.drawer)
|
|
|
- const text = aggregator.drawer.aggregatorC.konvaObject.children[0]
|
|
|
- const middlePoint = aggregator.drawer.aggregatorC.konvaObject.children[1]
|
|
|
+ const aggregatorC = aggregator.drawer.aggregatorC;
|
|
|
+ const middlePointKonvaObject = aggregatorC.konvaObject
|
|
|
+ pointC.bind(coord.posX, coord.posY, pointA.label);
|
|
|
+ const text = middlePointKonvaObject.children[0]
|
|
|
+ const middlePoint = middlePointKonvaObject.children[1]
|
|
|
text.x(pointC.posX + 10);
|
|
|
text.y(pointC.posY - 10);
|
|
|
middlePoint.x(pointC.posX);
|
|
|
middlePoint.y(pointC.posY);
|
|
|
+ const aggregators = aggregatorC.aggregators.filter(x => !(x.drawer instanceof MiddlePointDrawer))
|
|
|
+ for (let i = 0; i < aggregators.length; i++) {
|
|
|
+ console.log("i", aggregators[i])
|
|
|
+ aggregators[i].drawer.update(aggregators[i], e)
|
|
|
+ }
|
|
|
super.batchDraw();
|
|
|
}
|
|
|
|