|
|
|
|
|
Re: label for a shape [message #634384 is a reply to message #633649] |
Thu, 21 October 2010 13:57 |
Tim Kaiser Messages: 118 Registered: July 2009 |
Senior Member |
|
|
Hi,
currently, there is no way showing something outside
the invisible container, the childs get clipped.
You could adopt the size of the invisible container in your
Layout Feature depending on the size required by its childs.
Does it solve the problem?
@Ken: sounds good...if you have concrete ideas how this could work you might open a bugzilla entry proposing a contribution.
Best, Tim
[Updated on: Thu, 21 October 2010 14:21] Report message to a moderator
|
|
|
Re: label for a shape [message #634609 is a reply to message #634384] |
Fri, 22 October 2010 12:39 |
Ken Wenzel Messages: 51 Registered: July 2009 |
Member |
|
|
Hallo,
Quote: |
You could adopt the size of the invisible container in your
Layout Feature depending on the size required by its childs.
|
We do the other way round. The user is only allowed to resize the invisible shape that is later used to recalculate the sizes of its children accordingly.
Unfortunately, this leads to the problem that the height of a multi-line text cannot be correctly computed by a layout feature since it would have to know if the text
will be wrapped or not.
Giving the user the abililty to resize/move the node shape would require specialized resize and move features. Another problem with this approach would be the mentioned clipping of children if e.g. a child is resized/moved beyond the bounds of its parent.
Quote: |
@Ken: sounds good...if you have concrete ideas how this could work you might open a bugzilla entry proposing a contribution.
|
I don't know how much work would be required to implement such a feature. Would it be possible to refactor the interface ConnectionDecorator into a generic one like PictogramElementDecorator?
Best regards,
Ken
[Updated on: Sat, 23 October 2010 10:35] Report message to a moderator
|
|
|
Re: label for a shape [message #634996 is a reply to message #633649] |
Mon, 25 October 2010 11:24 |
Tim Kaiser Messages: 118 Registered: July 2009 |
Senior Member |
|
|
Hi,
it is fine to use the resize on the invisible container only.
Still it might be possible to precalculate if the text needs to be wrapped and how much space it will take. Then you may answer true/false depending on the above results in the canResize method of the Resize Feature.
Also you might be interested in
GraphitiUi.getUiLayoutService().calculateTextSize()
Regarding your proposal, i think the interfaces are one side and your proposal sounds sensible but the real complications lie in the implementation of the rendering engine...that is,how would the new concept be mapped to GEF/Draw2d....i am reluctant to say how much work it would be...it would require a deep dive at least. If you really see a lot of added value in such a feature please open a bugzilla entry with type "enhancement request".
Best regards, Tim
[Updated on: Mon, 25 October 2010 11:24] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05604 seconds