use of org.kie.workbench.common.stunner.core.client.shape.EdgeShape in project kie-wb-common by kiegroup.
the class NodeBuilderControlImpl method updateConnectorShape.
@SuppressWarnings("unchecked")
protected void updateConnectorShape(final Edge<? extends ViewConnector<?>, Node> inEdge, final Node targetNode, final Connection sourceConnection, final Connection targetConnection) {
final ViewConnector connectorContent = (ViewConnector) inEdge.getContent();
canvasHandler.applyElementMutation(inEdge, MutationContext.STATIC);
final EdgeShape edgeShape = (EdgeShape) canvasHandler.getCanvas().getShape(inEdge.getUUID());
final Node source = inEdge.getSourceNode();
if (null != source && null != targetNode) {
final Shape<?> sShape = canvasHandler.getCanvas().getShape(source.getUUID());
final Shape<?> tShape = canvasHandler.getCanvas().getShape(targetNode.getUUID());
connectorContent.setSourceConnection(sourceConnection);
connectorContent.setTargetConnection(targetConnection);
edgeShape.applyConnections(inEdge, sShape.getShapeView(), tShape.getShapeView(), MutationContext.STATIC);
}
}
Aggregations