예제 #1
0
파일: Flow.php 프로젝트: manialib/manialink
 function postFilter(\Manialib\Manialink\Elements\Base $node)
 {
     $this->xIndex += $node->getRealSizenX() + $this->marginWidth;
     if (!$this->maxHeight || $node->getRealSizenY() > $this->maxHeight) {
         $this->maxHeight = $node->getRealSizenY();
     }
     $this->currentLineElementCount++;
 }
 function preFilter(\ManiaLib\Manialink\Elements\Base $node)
 {
     if (!$this->init && $this->getParent()) {
         $this->xIndex = $this->getParent()->getSizenX();
         $this->init = true;
     }
     $marginWidth = $this->xIndex == $this->getParent()->getSizenX() ? 0 : $this->marginWidth;
     $this->xIndex -= $node->getRealSizenX() + $marginWidth;
 }
예제 #3
0
 function __clone()
 {
     parent::__clone();
     if ($this->layout instanceof AbstractLayout) {
         $this->layout = clone $this->layout;
     }
 }
예제 #4
0
 function preFilter(\ManiaLib\Manialink\Elements\Base $node)
 {
     $this->yIndex += $node->getRealSizenY() + $this->marginHeight;
 }
 function updateChild(Base $node)
 {
     $node->setPosnX($node->getPosnX() + $this->xIndex);
     $node->setPosnY($node->getPosnY() + $this->yIndex);
     $node->setPosnZ($node->getPosnZ() + $this->zIndex);
 }
예제 #6
0
 /**
  * Returns the position of an element in relation to another element and
  * according to their respective alignments
  * 
  * @param Base Parent element
  * @param string Horizontal alignement of the element you want to place
  * @param string Vertical alignement of the element you want to place
  * @return array Calculated position of the element you want to place. The
  * array contains 2 elements with "x" and "y" indexes
  */
 public static final function getAlignedPos(Base $object, $newHalign, $newValign)
 {
     $newPosX = self::getAlignedPosX($object->getPosnX(), $object->getRealSizeX(), $object->getHalign(), $newHalign);
     $newPosY = self::getAlignedPosY($object->getPosnY(), $object->getRealSizeY(), $object->getValign(), $newValign);
     return array('x' => $newPosX, 'y' => $newPosY);
 }
예제 #7
0
파일: Line.php 프로젝트: manialib/manialink
 function postFilter(\Manialib\Manialink\Elements\Base $node)
 {
     $this->xIndex += $node->getRealSizenX() + $this->marginWidth;
 }