Render custom connections

Hi,
referring to the custom-elements example, I have Extended the CustomContextPadProvider with a second Option to connect elements to each other.

The first connection option should render a solid red connection and the second option should render a dashed blue connection line.
However, in the CustomElementFactory.create function, the elementType-parameter is always ‘custom:connection’.
But either there, I want to decide between ‘solid red’ and ‘dashed blue’, or in the CustomRenderer.drawCustomConnection function.

Can someone help me, how I can pass Options like ‘solid red’ or ‘dashed blue’ from the ContexPadProvider to the ElementFactory or Renderer?

Thanks a lot.

Can you give some more context here? Do you want to be able to connect elements using two different types of connections or do you just want to be able to render the same connection in different colors?

In fact, I want to have different connections with different semantics and appearance each.

For instance, a connection from one activity to a second activity is decorated with an clock icon, meaning there is a temporal dependency between these to.

In another case, I select an activity and choose the “same_actor” connection, decorated with an small person icon, and link this activity to a second activity, meaning that these two activities has to be done by the same actor.

So I want to render two different kind of connections which I can choose from the ContextPad of an activity.

Hey,

Any news about it ? I’m trying to do the same thing

Please do not necrobump old topics. Instead link to this thread from new topic.