-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of KLabels consisting of multiple KText fields #43
Comments
@le-cds @NiklasRentzCAU do see any serious objections against dropping the current restriction of allowing at most KText element per KLabel except the incompatibility with Graphviz dot? What about the label management stuff? |
I guess this would violate the general rule of having one active KRendering element for each KGraphElement. The label size estimation in the PlacementUtil.java of in the microlayout expects a single Rendering to represent the element (as all other graph elements as well) and estimates the size there. Also, the rendering in the Sprotty (and I think also in the SWT case) expects a single rendering for the elment, which in the case of a label happens to be a single KText currently. |
Not necessarily. If the multiple
The currently single
This is already given for labels plus the additional check of containing exactly one Hence, the change would basically involve dropping the additional check (relaxing to at least one?) , and making sure the/some reasonable label text is added to the ELK graph in case the layouter requires label text explicitly. |
Label management would have to be adapted. It currently operates on a text set on the Lines 253 to 265 in d21bf90
This would have to be modified, but the problem is that it might not be clear how the modified text is to be distributed over the |
I wouldn't do any sophisticated things here. Are those label management components active by default? |
No, label managers have to be explicitly set on a graph through a property, so probably no harm done. Still, size estimation would have to be adapted for label management to be able to reserve enough space for all |
klighd +.piccolo: enabled support of multiple KTexts per KLabel as demanded in #43
I just wanted to test this feature to close #13 and this issue as well, but can you please tell me how a client would override this guarding property For reference, this is the
I also needed to fix some NPE first, see other PR I will link here in a second. |
Hi, if I'm right, you cannot activate it in the Line 635 in de61aa1
|
I see, so this is a feature that has to be activated programatically. I tested setting it in the diagram synthesis - this is in fact too late - and in the DiagramViewPart, which worked. So as far as I understand overriding that would be necessary for a client to use the feature. Do you want to add anything else for this issue (e.g. you mentioned individual selectability in the ticket description)? Otherwise I would close this issue. |
In some client project the ability to compose
KLabel
s of severalKText
element would be extremely valuable. On the one hand thoseKText
s shall be stylable differently as well as independently selectable or react on clicks with different actions.Here's an example:
Caveat: Labels size computations by layout algorithms (like GraphViz dot) will be impaired for such view models. Consequently, the diagram synthesis developer is in charge of configuring things right.
The text was updated successfully, but these errors were encountered: