Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
Issue imixs#189
  • Loading branch information
rsoika committed Feb 20, 2023
1 parent 66668c9 commit f65e64e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,16 @@ export class BPMNPropertyPanel extends AbstractUIExtension implements SelectionL
this.containerElement.appendChild(headerCompartment);
this.headerDiv = headerCompartment;

// eslint-disable-next-line arrow-parens
this.headerDiv.addEventListener('mousedown', (e) => {
this.isResizing = true;
this.currentY = e.clientY;
});
// eslint-disable-next-line arrow-parens
this.headerDiv.addEventListener('mouseup', (e) => {
this.isResizing = false;
});
// eslint-disable-next-line arrow-parens
window.addEventListener('mousemove', (e) => {
if (!this.isResizing) {
return;
Expand All @@ -128,7 +131,7 @@ export class BPMNPropertyPanel extends AbstractUIExtension implements SelectionL
this.currentY = e.clientY;

// if the mouse is no longer within the diagram plane, we stop the resizing
if (parent && !parent.matches(":hover")) {
if (parent && !parent.matches(':hover')) {
this.isResizing = false;
}
});
Expand Down Expand Up @@ -210,7 +213,10 @@ export class BPMNPropertyPanel extends AbstractUIExtension implements SelectionL
this.actionDispatcher.requestUntil(requestAction).then(response => {
if (SetContextActions.is(response)) {
this.actionDispatcher.dispatch(
SetUIExtensionVisibilityAction.create({ extensionId: BPMNPropertyPanel.ID, visible: !this.editorContext.isReadonly })
SetUIExtensionVisibilityAction.create({
extensionId: BPMNPropertyPanel.ID,
visible: !this.editorContext.isReadonly
})
);
}
});
Expand Down Expand Up @@ -265,7 +271,6 @@ export class BPMNPropertyPanel extends AbstractUIExtension implements SelectionL
}
// set new selectionId
this.selectedElementId = element.id;
console.log('======== > setup new property panel - selectionID=' + element.id);
// because the jsonForms send a onchange event after init we mark this state here
this.initForm = true;
// update header
Expand Down Expand Up @@ -298,13 +303,15 @@ export class BPMNPropertyPanel extends AbstractUIExtension implements SelectionL
];

// render JSONForm // vanillaRenderers
// we also set the key to the current elementID to reinitialize the form panel
this.panelContainer.render(<JsonForms
data={bpmnPropertiesData}
schema={bpmnPropertiesSchema}
uischema={bpmnPropertiesUISchema}
cells={vanillaCells}
renderers={bpmnRenderers}
onChange={({ errors, data }) => this.setState({ data })}
key={this.selectedElementId}
/>);
}
} else {
Expand Down
6 changes: 6 additions & 0 deletions open-bpmn.glsp-client/workspace/test.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<bpmn2:documentation id="documentation_M0zeWA"/>
<bpmn2:conditionalEventDefinition expression="b&#10;c&#10;d" id="conditionalEventDefinition_SHfHiA" language="72"/>
</bpmn2:startEvent>
<bpmn2:manualTask id="task_2yKjyg" name="Task-1">
<bpmn2:documentation id="documentation_5jrNVg"/>
</bpmn2:manualTask>
</bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1" name="OpenBPMN Diagram">
<bpmndi:BPMNPlane bpmnElement="process_1" id="BPMNPlane_1">
Expand All @@ -15,6 +18,9 @@
<dc:Bounds height="14.0" width="100.0" x="110.0" y="129.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="task_2yKjyg" id="BPMNShape_BpJQRQ">
<dc:Bounds height="50.0" width="110.0" x="256.0" y="86.0"/>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>

0 comments on commit f65e64e

Please sign in to comment.