Skip to content

Qualifier labels and associations' lines not correctly drawn for qualified associations #1467

Description

@travkin79

Problem description
When using qualified associations the qualifier labels overlap with classes, are placed on the wrong side of an association, or the association's line between the qualifier and the target class is not visible. In addition, the length of edges cannot be modified if a direction is added to the association definition.

I have a few examples to illustrate that.

This issue is a follow up of a previous discussion in the user forum. That discussion contains hints to additional issues with qualified associations.

Steps to reproduce - Example 1

  1. Create a diagram as follows
@startuml
    interface Map<K,V>
    class HashMap<Long,Customer>

    Map <|.. HashMap
    Shop [customerId: long] ---> "customer\n1" Customer
    HashMap [id: Long] -r-> "value" Customer
@enduml
  1. Observe the rendered result. Here, the qualifier label "id: Long" overlaps with the class Customer and hides the association line between the classes HashMap and Customer or it doesn't exist at all. There has to be a bigger distance between the classes HashMap and Customer for the association to be drawn correctly.
    Please notice that the association length between the classes Shop and Customer could successfully be drawn longer than usually by writing ---> instead of -->.

image

Expected behavior
I expected the diagram to look something like
image

Steps to reproduce - Example 2

  1. Create a diagram as follows
@startuml
    class HashMap<K,V>

    HashMap [key: K] -u-> V1
    HashMap [key: K] -r-> V2
    HashMap [key: K] -d-> V3
    HashMap [key: K] -l-> V4
@enduml
  1. Observe the rendered result. Here, the qualifier labels are not correctly placed in case of associations drawn in the left or up direction. In these cases the labels have to be placed near the HashMap class. In addition, changing the association line's length does not work with a direction hint, i.e. replacing HashMap [key: K] -r-> V2 with HashMap [key: K] -r----> V2 doesn't change the line's length.

image

Expected behavior
I expected the qualified associations to be drawn the same way as the case HashMap [key: K] -d-> V3, but with adapted direction. The result should like something like the following. Increasing the length of the edge in source code (e.g. replacing HashMap [key: K] -r-> V2 with HashMap [key: K] -r----> V2) should increase the rendered association's length.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions