Make dashlet position non-random. Use their preferred width/height for now

This commit is contained in:
Stephen Abello
2026-01-12 16:26:52 +01:00
parent 02e59c906b
commit 076a6d0495
4 changed files with 47 additions and 11 deletions

View File

@@ -53,10 +53,10 @@ class DashboardGrid extends UIBlock
return $this;
}
public function AddDashlet(UIBlock $oDashlet, string $sDashletId, string $sDashletClass, array $aFormViewData): DashboardGrid
public function AddDashlet(UIBlock $oDashlet, string $sDashletId, string $sDashletClass, array $aFormViewData, ?int $iPositionX = null, ?int $iPositionY = null, ?int $iWidth = null, ?int $iHeight = null): DashboardGrid
{
$oWrapper = new DashletWrapper($oDashlet, $sDashletClass, $sDashletId, $aFormViewData);
$oSlot = new DashboardGridSlot(null, $oWrapper);
$oSlot = new DashboardGridSlot(null, $oWrapper, $iPositionX, $iPositionY, $iWidth, $iHeight);
$this->AddSlot($oSlot);
return $this;