> I found a bug in the bounded node unregistering code. Attached is a modified
> version of the "Groups" demo tutorial which seems to work here. Click the
> group to delete it. First update SVN though.
> I also added a convenience function to the node class. You can now call
>
> node.remove()
>
> to remove a node from its parent. It's the same as doing node.parent = None.
>
> So your event handler will now look like
>
>    def on_left_down(evt):
>        evt.node.remove()
>    group.subscribe( on_left_down, 'left_down' )
>
> which should suffice to remove the group and its children from the canvas.
>

Thanks Mathias, It works nice.

I am grouping some nodes (2 lines, an arc, and a 'point') to create a
drawing of an angle.
Is it possible to set the bounding box of the group to a different
value (in my case I'd like the bounding box to be the size of the
arc)?
I'd like that because once I draw an angle with two long lines, its
bounding box (the rectangle) occupies all the canvas and it is
difficult to select other objects.
As you said, I can find all nodes under the cursor with evt.nodes but
it would be easier in my application (to interact with the user) if I
have only one node under the cursor.
It seems the bounding box property is not settable (group.boundingBox
= box doesn't work...).

If I can't set the bounding box, is it possible to simply not include
some nodes in the group bounding box calculation even if they are
children?

This is not a big deal. I can do a workaround of testing all
nodes/groups under the cursor and just returning a node when the
cursor is in a certain area of the node.

Marcos
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to