Hi Sachin,
Currently we don’t have an option to get the diagram id in events and we have created a new incident for this query. please refer to that incident for further updates.
However as a workaround, you can get the diagram id from node by defining the diagram id in defaultSettings’s node property.
Here is the code example:
<ej-diagram ng-attr-id="{{ 'object-' + index }}" e-height="500px" e-width="700px" e-nodes="nodes" e-backgroundcolor="backgroundColor"
e-defaultsettings-node="defaultSettings.node"
e-nodecollectionchange="nodeCollectionChange">
</ej-diagram>
angular.module('syncApp', ['ejangular'])
.controller('diagram', function ($scope) {
$scope.defaultSettings = {
node: {
diagramId: "object-2"
}
};
$scope.nodeCollectionChange = function (args) {
if (args.element) {
console.log(args.element.diagramId);
}
}
});
Here is playground link for your reference.
Regards,
Naganathan K G