Flex redrawing background when Scrolling, degrafa: How ?.

Posted by coulix on Stack Overflow See other posts from Stack Overflow or by coulix
Published on 2008-11-19T18:32:20Z Indexed on 2010/03/19 11:01 UTC
Read the original article Hit count: 332

Filed under:
|
|

Hi Everyone, I am using a canvas which has a degrafa background, so far so good. However when scrolling apears the background (degrafa grid) does not get redrawn. In the code the bg strokes are linked to the container height. The thing is container.height does not change even when scrolling. How do i get the heigh of the whole area so i can set the new height to my degrafa background ?

it looks like this.

alt text

alt text

 <mx:Canvas id="blackBoard"
    			width="100%" 
    			height="100%" 
    			x="0" 
    			y="0" 
    			backgroundColor="#444444"
    			clipContent="true">

    <!-- Degrafa Surface   -->
    <degrafa:Surface id="boardSurfaceContainer">
            <degrafa:strokes>
                <degrafa:SolidStroke    id="whiteStroke"
                                        color="#EEE"
                                        weight="1"
                                        alpha=".2"/>
            </degrafa:strokes>

            <!-- Grid drawing -->
            <degrafa:GeometryGroup id="grid">
                <degrafa:VerticalLineRepeater   count="{blackBoard.width / ApplicationFacade.settings.GRID_SIZE}"
                                                stroke="{whiteStroke}"
                                                x="0"
                                                y="0"
                                                y1="{blackBoard.height}"
                                                offsetX="0"
                                                offsetY="0"
                                                moveOffsetX="{ApplicationFacade.settings.GRID_SIZE}"
                                                moveOffsetY="0"/>

                <degrafa:HorizontalLineRepeater count="{blackBoard.height / ApplicationFacade.settings.GRID_SIZE}"
                                                stroke="{whiteStroke}"
                                                x="0"
                                                y="0"
                                                x1="{blackBoard.width}"
                                                offsetX="0"
                                                offsetY="0"
                                                moveOffsetX="0"
                                                moveOffsetY="{ApplicationFacade.settings.GRID_SIZE}"/>

            </degrafa:GeometryGroup>	      

        </degrafa:Surface>

© Stack Overflow or respective owner

Related posts about flex

Related posts about scroll