Add text position

This commit is contained in:
Paulo Gustavo Veiga 2022-02-23 17:52:12 -08:00
parent d86bce42bf
commit 091a80449d
2 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,11 @@ class MainTopic extends Topic {
const text = this.getText();
textShape.setText(text);
textShape.setOpacity(0.5);
// Copy text position of the topic element ...
const textPosition = this.getTextShape().getPosition();
textShape.setPosition(textPosition.x, textPosition.y);
group.append(textShape);
}
return group;

View File

@ -161,6 +161,7 @@ abstract class NodeGraph {
createDragNode(layoutManager: LayoutManager) {
const dragShape = this._buildDragShape();
return new DragTopic(dragShape, this, layoutManager);
}