Skip to content

Commit

Permalink
impl
Browse files Browse the repository at this point in the history
Issue imixs#207
  • Loading branch information
rsoika committed Mar 11, 2023
1 parent 290680c commit 13fa9b5
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import org.openbpmn.bpmn.BPMNModel;
import org.openbpmn.bpmn.BPMNNS;
import org.openbpmn.bpmn.elements.core.BPMNBounds;
import org.openbpmn.bpmn.elements.core.BPMNElementNode;
import org.openbpmn.bpmn.exceptions.BPMNMissingElementException;
import org.openbpmn.bpmn.exceptions.BPMNModelException;
import org.w3c.dom.Element;

Expand Down Expand Up @@ -62,17 +60,19 @@ public void setText(String content) {

/**
* Remove any embedded bpmndi:BPMNLabel element within the bpmndi:BPMNShape
*
* Positioning of the label is part of the client. Any position update should
* ignore these settings in Open-BPMN.
*
*/
@Override
public BPMNBounds setBounds(double x, double y, double width, double height) throws BPMNMissingElementException {

BPMNBounds result = super.setBounds(x, y, width, height);
public void setPosition(double x, double y) {
super.setPosition(x, y);

// remove optional BPMNLabel
Element bpmnLabel = getModel().findChildNodeByName(this.bpmnShape, BPMNNS.BPMNDI, "BPMNLabel");
if (bpmnLabel != null) {
this.bpmnShape.removeChild(bpmnLabel);
}
return result;
}
}

0 comments on commit 13fa9b5

Please sign in to comment.