full error detail
do you think it could be issue due to my BPMN Modeler version?
Itâs completely not readable if your code is formatted like that. Can you please add some tabs etc.?
If I can guess I would say, modeling is not put into your props initialization. So instead of of
function createAttribTabGroups(element, elementRegistry) {
var colorAttribGroup = {
id: âcolor-attribâ,
label: âColor Attribâ,
entries: []
};
colorProps(colorAttribGroup, element);
return [
colorAttribGroup
];
}
var attribTab = {
id: 'attrib',
label: 'Colours',
groups: createAttribTabGroups(element, elementRegistry)
};
youâll have to do
function createAttribTabGroups(element, elementRegistry, modeling) {
var colorAttribGroup = {
id: âcolor-attribâ,
label: âColor Attribâ,
entries: []
};
colorProps(colorAttribGroup, element, modeling);
return [
colorAttribGroup
];
}
var attribTab = {
id: 'attrib',
label: 'Colours',
groups: createAttribTabGroups(element, elementRegistry, modeling)
};
Make sure you inject it correctly to your properties provider
function AttribPropertiesProvider(eventBus, bpmnFactory, elementRegistry, modeling) {
// ....
}
AttribPropertiesProvider.$inject = [
'eventBus',
'bpmnFactory',
'elementRegistry',
'modeling'
];
// ...
Btw. instead of using modeling
directly, you could also go for the second way Iâve shown before for the set
operation
set: function(element, values, node) {
var color = values.color;
var di = {};
assign(di, { fill: color });
return cmdHelper.updateProperties(element, {
di: di
}
});
}
This way you would avoid using the extra dependency.
with this option also getting error below
do i have version issue?
Please, make sure the functions youâre trying to call are defined. This kind of error can easily be debugged.
Fix it by importing: import { assign } from 'min-dash';
.
sorry if it is stupid question in past i bundle it to one file so i am not sure how to include it import { assign } from 'min-dash