Labeltext show wrong position after export


@nikku and All,

I have build an custom modeler and draw some shape the canvas, it works fine but when I export these xml and import again. The labels for the shape show wrong position.

any Idea for this case. Thanks a lot

My Renderer dependencies as below:

“dependencies”: {
“bpmn-js”: “^0.13.0”,
“diagram-js”: “^0.13.0”,
“jquery”: “^2.1.1”,
“inherits”: “^2.0.1”,
“lodash”: “^3.0.0”

Append: after importation from the exported xml, Label shown wrong position as describled before.
and when i double click to modify the label again even only type space,The label display on the right way

You are running into this issue. You must make sure the diagram is visible during import or label layouting won’t work.

HI @nikku ,that’s to say we will fix this in the further,right?
for the temporarily solution, “You must make sure the diagram is visible during import ”, I have an question:

the diagram is generated by the imported xml,how can I archieve this goal?

That really depends on the environment you are using.

Provide your project for us to look into and we might be able to have a quick look and provide further assistance.

We get the xml from database and set these xml to an hidden field named “xmlData” on the page.
and expect to show the graph when the document.ready

var xml=$("#xmlData").val();
        var newDiagramXML = "somexml";

The question here is: Is the diagram container visible during XML importing.

var bpmnjs = new BpmnRenderer({ container: '#SOMECONTAINER' });

// #SOMECONTAINER visible when importing XML?

I have solved this problem. really thanks for your help