I have an error when editing text in each shape of the mindmap. It automatically scales to full width. I want to Fit the width to the content of the mindmap. Help me
Could you please, provide a complete demo code snippet or a demo link, where the problem can be reconstructed locally?
//code in ts file
const config: any = { type: ‘mindmap’ }
self.diagram = new Diagram(self.containerDiagram.nativeElement, config);
self.editor = new DiagramEditor(self.containerEditor.nativeElement, config);
self.diagram.data.parse(diagramData);
//code in html file
Edit
Save
my code is very simple. but i don’t know it have error when i typeing
// html file
<div class="dhx-container_inner" [ngClass]="{'dhx_sample-container__with-editor': expanded, 'dhx_sample-container__without-editor': collapsed }">
<section [style.display]="collapsed ? 'flex' : 'none'" id="control" class="dhx_sample-controls">
<button style="margin-left: 50px;" class="diagram-button" (click)="runEditor()">Edit</button>
<button class="diagram-button" (click)="saveDiagram()">Save</button>
</section>
<div #diagram class="dhx_sample-widget" [style.display]="collapsed ? 'block' : 'none'" style="height: 100vh;"></div>
<div #editor class="dhx_sample-widget" [style.display]="collapsed ? 'none' : 'block'" style="height: 100vh;"></div>
</div>
Unfortunately I still not able to reproduce your issue locally.
The following snippet works well for me:
https://snippet.dhtmlx.com/qkurkuni
If the problem still occurs for you please, provide a complete demo where the problem can be reconstructed.