diff --git a/packages/mindplot/src/components/MainTopic.ts b/packages/mindplot/src/components/MainTopic.ts index e39e80db..329f87da 100644 --- a/packages/mindplot/src/components/MainTopic.ts +++ b/packages/mindplot/src/components/MainTopic.ts @@ -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; diff --git a/packages/mindplot/src/components/NodeGraph.ts b/packages/mindplot/src/components/NodeGraph.ts index 47495323..ed4bf609 100644 --- a/packages/mindplot/src/components/NodeGraph.ts +++ b/packages/mindplot/src/components/NodeGraph.ts @@ -161,6 +161,7 @@ abstract class NodeGraph { createDragNode(layoutManager: LayoutManager) { const dragShape = this._buildDragShape(); + return new DragTopic(dragShape, this, layoutManager); }