Query |
Response | |
I ran the project. when I have many shapes in diagram, I want to see ID and properties of selected shape on properties panel. |
We have modified the sample in which we have rendered a node Id, offsetX and offsetY properties alone in the property panel. Similarly, you can do it for other properties. Please refer to the sample as below.
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/BPMNmodifiedsample1581659013
| |
I export the XML code of process done by bpmn modeler, and I want to see that changes done on properties panel in my xml code. how can I do it? |
Once you have changed the node properties, it will be reflected in nodes collection. So, you can iterate the node from diagram nodes collection as shown in below code example.
Code example:
|
<ejs-textbox id='offsetX' floatLabelType="Auto" :change='textboxChange'></ejs-textbox>
textboxChange: (args) => {
//iterate an node
for(var i=0; i< diagramInstance.nodes.length; i++) {
//get an node
let node = diagramInstance.nodes[i];
//set an textbox value
node.width = args.value
}
} |
data: function() {
return {
selectionChange: (args) => {
if(args.type === "Addition" && args.state === "Changed") {
if(diagramInstance.selectedItems.nodes.length > 0) {
let selectedNode = diagramInstance.selectedItems.nodes[0];
//set an node value to an textbox
If(selectedNode.addInfo && selectedNode.addInfo.offsetX)
document.getElementById("offsetX").value = selectedNode.addInfo.offsetX;
If(selectedNode.addInfo && selectedNode.addInfo.offsetY)
document.getElementById("offsetY").value = selectedNode.addInfo.offsetY;
}
}
},
}
} |