Hello!

The last few eeks I have been working on my own custom component for 
Flex. Now the component itself is inherited from the UIComponent class, and
then basically some child IComponents which draws different "layers". 
For example, if I have seperate layer for the interaction such as the 
handling of clicks, and the drawing of the selection area.
Other layers are responsible for drawing the lines between items, and 
the latter for drawing the items itself.

The problem I am now having is that when I move around the drawn items 
they happen to get clipped to my custom component. For example, I can 
move the item out of the current specified dimensions of the component 
and have it show up on a different part of my application window.

I have the feeling Flex doesn't automatically clip children to the 
parent control (UIComponent), is this correct? My second question, would 
be what is the best way to fix this?
My current ideas are:

    1. Implement clipping by disabling dragging outside the dimensions 
of the control (e.g. if mouseX < control.width then stop)
    2. Create a Shape instance and set this as mask on the control

Anyone able to help me out with this? I suppose it's something common, 
though.

Yours,
Weyert de Boer

Reply via email to