quirk in group resize behavior

Monte Goulding monte at appisle.net
Tue Jun 21 08:54:30 EDT 2016


> On 21 Jun 2016, at 10:31 PM, Mike Kerner <MikeKerner at roadrunner.com> wrote:
> 
> Isn't this part of what the GM is supposed to do?

Yes and no. The GM can’t change the behavior of the engine. If the engine is doing something interesting with the controls of a group in one particular circumstance (resizing from topLeft the opposite amount you are resizing from the bottomRight) then any GM settings that make the GM do that will behave that way. 

Given this:

get the rect of group 1
add 20 to item 1 of it
add 20 to item 2 of it
subtract 20 from item 3 of it
subtract 20 from item 4 of it

The following code will make the same group that look quite different:
— objects stay where they are and group rect moves
set the rect of group 1 to it

— objects will be right 20 and down 20 along with the topLeft of the group
set the width of group 1 to item 3 of it-item 1 of it
set the height of group 1 to item 4 of it-item 2 of it
set the topLeft of group 1 to item 1 to 2 of it

Now let’s say we added 21 to item 4 instead of 20:
— objects will be right 20 and down 20 along with the topLeft of the group
set the rect of group 1 to it

Still looking for a use case or anyone who thinks changing this will break their app…

One possible use case is if you had an object at the exact centre of this group it would remain in that position as you are basically resizing the group around the object. Perhaps that’s the use case?

Cheers

Monte


More information about the use-livecode mailing list