2 Replies Latest reply on Sep 18, 2008 9:08 AM by [Si]dragon

    Clipping Unclipped Grandchildren?

    [Si]dragon Level 1
      Bear with me; I am still new to Flex. What follows may describe a suboptimal solution and I am wide-open to suggestion.

      I am writing a component on which users will be able to drag display objects around. One goal is to let them position these objects at negative offsets or, more generally, outside the certain bounds that represent the working area. Currently, I have a larger Canvas component nesting the smaller Canvas that represents the working area for the editable objects. The objects are added as children to the nested Canvas. To get the desired effect, I disable clipping on the nested Canvas and the objects may then be freely dragged throughout the larger region. (Adobe Illustrator demonstrates the desired behavior exactly—imagine the white document region as the nested working area, and the gray area around it as the larger component.) This is all very convenient for some reasons ( e.g., the movable object x and y coordinates are computed correctly). Trouble is, with clipping disabled, the objects may be freely moved around the entire Application region.

      Two questions. First, is there any way the larger Canvas can clip and scroll the children belonging to the smaller, nested Canvas (its grandchildren)? Second, am I taking a bone-headed approach to this and are there any existing third party components that would give me an Illustrator-like workspace?

      Thanks in advance!