Edit label of parent shape by doubleclick


#1

Hi,

I have a shape with multiple labels. Here the shape is a rectangle that represent a class and the labels exist for the class name, properties and functions. The labels are drawn inside this shape. It looks like a traditional uml class diagram.

diagram

A mechanic to support label editing is already included.

Now i want to edit the corresponding label inside the shape on a doubleclick. When the doubleclick is fired i get from the event the shape element. From this shape element i can navigate to all labels but i don’t know which one i should select (navigate to). Could i get all model elements (here labels) from the position i double clicked from the element registry?
Do i have to implement a filter?

The basic idea is to support partial edit (here of the Class A).


#2

First of all, thanks for sharing this marvelous screenshot. Do you build UML on top of diagram-js?

Could i get all model elements (here labels) from the position i double clicked from the element registry?

Unfortunately we do not offer the ability at the moment.

I’m not sure what exactly you’re double clicking but I presume it is the parent element of the labels? If that is the case, you may extract the actual click target from the event position + children and open the editor there.