Null script icon fix (#2021)

* do not show the script icon if value is not set

* updated bpmn-js-spiffworkflow

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
jasquat 2024-08-01 14:40:51 -04:00 committed by GitHub
parent 3c4cf52fd6
commit ccd9f51b62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -8343,7 +8343,7 @@
}, },
"node_modules/bpmn-js-spiffworkflow": { "node_modules/bpmn-js-spiffworkflow": {
"version": "0.0.8", "version": "0.0.8",
"resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#5ded6f52d8529ccf8318d65c35edc052dfc3e4e5", "resolved": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#a75437462e1d5282e87368f8865fd489f32a2792",
"license": "LGPL", "license": "LGPL",
"dependencies": { "dependencies": {
"inherits": "^2.0.4", "inherits": "^2.0.4",
@ -32188,7 +32188,7 @@
} }
}, },
"bpmn-js-spiffworkflow": { "bpmn-js-spiffworkflow": {
"version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#5ded6f52d8529ccf8318d65c35edc052dfc3e4e5", "version": "git+ssh://git@github.com/sartography/bpmn-js-spiffworkflow.git#a75437462e1d5282e87368f8865fd489f32a2792",
"from": "bpmn-js-spiffworkflow@github:sartography/bpmn-js-spiffworkflow#main", "from": "bpmn-js-spiffworkflow@github:sartography/bpmn-js-spiffworkflow#main",
"requires": { "requires": {
"inherits": "^2.0.4", "inherits": "^2.0.4",

View File

@ -351,7 +351,7 @@ export default function ReactDiagramEditor({
const overlays = diagramModeler.get('overlays'); const overlays = diagramModeler.get('overlays');
const scriptIcon = convertSvgElementToHtmlString(<BpmnJsScriptIcon />); const scriptIcon = convertSvgElementToHtmlString(<BpmnJsScriptIcon />);
if (preScript) { if (preScript?.value) {
overlays.add(event.element.id, { overlays.add(event.element.id, {
position: { position: {
bottom: 25, bottom: 25,
@ -360,7 +360,7 @@ export default function ReactDiagramEditor({
html: scriptIcon, html: scriptIcon,
}); });
} }
if (postScript) { if (postScript?.value) {
overlays.add(event.element.id, { overlays.add(event.element.id, {
position: { position: {
bottom: 25, bottom: 25,