This commit is contained in:
Thomas Peterson 2024-10-17 21:08:31 +02:00
parent d0f7b8fbf7
commit d2f722247e
2 changed files with 6 additions and 5 deletions

View File

@ -80,7 +80,7 @@ class Container
$sliderViewport->width = 10;
$sliderViewport->x = $viewport->x + $viewport->width - 10;
$ohP = ($viewport->height / 100);
$ratio = ($resultViewPort->height / ($viewport->height+$resultViewPort->height));
$ratio = ($viewport->height/$resultViewPort->height);
$sliderViewport->y = $viewport->y + (int)($view->getMoveToY()*$ratio);
$sliderViewport->height = (int)($ratio*100 * $ohP);
@ -106,9 +106,11 @@ class Container
$view->setMoveToY($view->getMoveEndY() + $thread->getEvent()->y - $view->getMoveStartY());
}
if($view->getMoveToY() + ($sliderViewport->height*$ratio) > ($viewport->height)) {
echo sprintf("COL: %s %d %d %d", $view->getId(), $view->getMoveToY(), $resultViewPort->height, $viewport->height).PHP_EOL;
if($view->getMoveToY() + ($viewport->height) > ($resultViewPort->height)) {
echo sprintf("TOP: %s %d %d %d", $view->getId(), $view->getMoveToY(), $resultViewPort->height, $viewport->height).PHP_EOL;
//$view->setMoveToX($view->getMoveEndX() + $thread->getEvent()->x - $view->getMoveStartX());
$view->setMoveToY($viewport->height - (int)($sliderViewport->height*$ratio) );
$view->setMoveToY($resultViewPort->height - $viewport->height );
}
}
if ($thread->getEvent() && $thread->getEvent()->getType() === EventType::MOUSEBUTTON_UP) {

View File

@ -60,12 +60,11 @@ class Column
$subViewPort->y += $viewportY+($view->getMoveToY()*-1);
$subViewPort->height = $viewportHeight;
}
echo sprintf("%s %d %d", $subView->getId(), $subViewPort->y, $subViewPort->height).PHP_EOL;
$vp = Widget::render($stylesCache, $thread, clone $subViewPort, $subView, $index+1);
$viewportY += $vp->height;
$viewportHeight -= $vp->height;
}
echo sprintf("%s %d", $view->getId(), $viewportY).PHP_EOL;
$viewport->height = $viewportY;
return $viewport;
}