Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Is it possible to resize node image?(Resize node image at runtime so that the label doesn't get truncated)
Is it possible to resize node image? [message #1837702] Thu, 04 February 2021 11:28 Go to next message
mike hill is currently offline mike hillFriend
Messages: 13
Registered: December 2020
Junior Member
Hi

I'm trying to adjust the size of a node based on the length of its label (in this case the label is the name attribute), so it doesn't get truncated.
I'm using Size computation expression to achieve this:
 aql:if self.name.toString().size()>24 then self.name.toString().size()/3 else 8 endif


This works fine for predefined styles such as a "Square", but it doesn't work as expected for "workspace image". When the condition is true it behaves as through it was set to -1, i.e. it sets resizes it to the original dimensions of the image.

Is it possible to resize node images? if not, is there another way to prevent the label from getting truncated?

Regards
Mike
Re: Is it possible to resize node image? [message #1837746 is a reply to message #1837702] Fri, 05 February 2021 08:16 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 262
Registered: August 2010
Senior Member
Hi Mike,

Indeed, we have a known issue with the Size computation expression with workspace images: https://bugs.eclipse.org/bugs/show_bug.cgi?id=508050
Unfortunately there is no auto-size capability on nodes but only for containers.

Regards,
Florian
Previous Topic:Arranging all nodes according to grid
Next Topic:How to access class attribute from outside of class
Goto Forum:
  


Current Time: Tue Apr 20 08:44:00 GMT 2021

Powered by FUDForum. Page generated in 0.01357 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top