@plait/mind 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/interfaces/options.mjs +1 -1
- package/esm2020/node.component.mjs +9 -3
- package/esm2020/plugins/with-mind-extend.mjs +1 -1
- package/esm2020/transforms/node.mjs +1 -1
- package/fesm2015/plait-mind.mjs +8 -2
- package/fesm2015/plait-mind.mjs.map +1 -1
- package/fesm2020/plait-mind.mjs +8 -2
- package/fesm2020/plait-mind.mjs.map +1 -1
- package/interfaces/element.d.ts +1 -1
- package/interfaces/options.d.ts +2 -0
- package/package.json +1 -1
package/fesm2020/plait-mind.mjs
CHANGED
|
@@ -2625,6 +2625,9 @@ class CollapseDrawer extends BaseDrawer {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
}
|
|
2627
2627
|
|
|
2628
|
+
// 1. When the text at the end has an italic attribute, the text is partially covered
|
|
2629
|
+
// 2. There will be some differences in the width measured by different browsers
|
|
2630
|
+
const WIDTH_BUFFER = 4;
|
|
2628
2631
|
class MindNodeComponent extends PlaitPluginElementComponent {
|
|
2629
2632
|
constructor(viewContainerRef, cdr) {
|
|
2630
2633
|
super(cdr);
|
|
@@ -2641,8 +2644,11 @@ class MindNodeComponent extends PlaitPluginElementComponent {
|
|
|
2641
2644
|
this.nodeInsertDrawer = new NodeInsertDrawer(this.board);
|
|
2642
2645
|
this.activeDrawer = new NodeActiveDrawer(this.board);
|
|
2643
2646
|
this.collapseDrawer = new CollapseDrawer(this.board);
|
|
2647
|
+
const plugins = this.board.getMindOptions().textPlugins;
|
|
2644
2648
|
this.textManage = new TextManage(this.board, this.viewContainerRef, () => {
|
|
2645
|
-
|
|
2649
|
+
const rect = getTopicRectangleByNode(this.board, this.node);
|
|
2650
|
+
rect.width = rect.width + WIDTH_BUFFER;
|
|
2651
|
+
return rect;
|
|
2646
2652
|
}, (point) => {
|
|
2647
2653
|
return isHitMindElement(this.board, point, this.element);
|
|
2648
2654
|
}, (textManageRef) => {
|
|
@@ -2654,7 +2660,7 @@ class MindNodeComponent extends PlaitPluginElementComponent {
|
|
|
2654
2660
|
else {
|
|
2655
2661
|
MindTransforms.setTopicSize(this.board, this.element, width, height);
|
|
2656
2662
|
}
|
|
2657
|
-
});
|
|
2663
|
+
}, plugins);
|
|
2658
2664
|
}
|
|
2659
2665
|
ngOnInit() {
|
|
2660
2666
|
super.ngOnInit();
|