Re: Move two FG objects on top of an image [message #89638 is a reply to message #89637] |
Mon, 03 November 2014 12:45  |
Helder Marchetto
Messages: 520 Registered: November 2011
|
Senior Member |
|
|
On Monday, November 3, 2014 9:35:38 PM UTC+1, Helder wrote:
> Hi,
> is the a way to bind two objects together so that if one is moved with the mouse, the other follows along?
> I'm talking about having for example an ellipse() and some text() that move/act together. I'm interested in this because what I finally want is some labelling of the annotation/marker.
> If there is not direct FG way, then I have to resort to creating object envelopes that when one is changed the other is also updated... But I hope that there is an easier FG solution.
>
> Thanks for any help.
>
> Cheers,
> Helder
I just noticed a "problem" in case one wishes to move a second object when the first is moved. I'm using the various event function (mouse_down_handler, mouse_up_handler,...). When the mouse_down function is called, the status of the getSelect() method returns the previous value and not the currently clicked object. I think that getSelect() gets updated after the call "return, 1" of the mouse_down_handler function. Kind of a pity, because tracking of clicked objects is somewhat more complicated, but not impossible.
Regards,
Helder
|
|
|