protected function updateSize()
    {
        $sizeY = abs($this->startY);
        $sizeX = 0;
        foreach ($this->elements as $idx => $element) {
            $sizeY += $element->getHeight() + $this->margin;

            if (abs($element->getX()) + $element->getWidth() > $sizeX) {
                $sizeX = abs($element->getX()) + $element->getWidth();
            }
        }

        $this->setSize($sizeX, $sizeY);
    }
protected function updateSize()
    {
        $sizeY = abs($this->startY);
        $sizeX = 0;
        foreach ($this->elements as $idx => $element) {
            $sizeY += $element->getHeight() + $this->margin;

            if (abs($element->getX()) + $element->getWidth() > $sizeX) {
                $sizeX = abs($element->getX()) + $element->getWidth();
            }
        }

        $this->setSize($sizeX, $sizeY);
    }
protected function updateSize ( ) { $ sizeY = abs ( $ this -> startY ) ; $ sizeX = 0 ; foreach ( $ this -> elements as $ idx => $ element ) { $ sizeY += $ element -> getHeight ( ) + $ this -> margin ; if ( abs ( $ element -> getX ( ) ) + $ element -> getWidth ( ) > $ sizeX ) { $ sizeX = abs ( $ element -> getX ( ) ) + $ element -> getWidth ( ) ; } } $ this -> setSize ( $ sizeX , $ sizeY ) ; }
Update the size of the layout according to all the elements in it.
Update the size of the layout according to all the elements in it .