summaryrefslogtreecommitdiffstats
path: root/modules-available/roomplanner/inc/pvsgenerator.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2019-07-17 16:52:02 +0200
committerSimon Rettberg2019-07-17 16:52:02 +0200
commit3da096142d44c31e180fb54c02ae9e9ff01b7dda (patch)
treec715a36c2fbbcd8e17bf7f80395fd4677416ec95 /modules-available/roomplanner/inc/pvsgenerator.inc.php
parent[roomplanner] Use .cachedScript() from slx-fixes (diff)
downloadslx-admin-3da096142d44c31e180fb54c02ae9e9ff01b7dda.tar.gz
slx-admin-3da096142d44c31e180fb54c02ae9e9ff01b7dda.tar.xz
slx-admin-3da096142d44c31e180fb54c02ae9e9ff01b7dda.zip
[roomplanner] First prototype of composed room editor
Saving/loading works, but no entry is generated for pvs.ini. Also this approach fails to meaningfully handle rooms with two removable walls where you also want to use both possible combinations of two combined rooms and a single one.
Diffstat (limited to 'modules-available/roomplanner/inc/pvsgenerator.inc.php')
-rw-r--r--modules-available/roomplanner/inc/pvsgenerator.inc.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules-available/roomplanner/inc/pvsgenerator.inc.php b/modules-available/roomplanner/inc/pvsgenerator.inc.php
index 2a4e2972..cfb38fd2 100644
--- a/modules-available/roomplanner/inc/pvsgenerator.inc.php
+++ b/modules-available/roomplanner/inc/pvsgenerator.inc.php
@@ -156,7 +156,7 @@ class PvsGenerator
* @param int $rotate rotate plan (0-3 for N E S W up, -1 for "auto" if highlightUuid is given)
* @return string SVG
*/
- public static function generateSvg($locationId = false, $highlightUuid = false, $rotate = 0)
+ public static function generateSvg($locationId = false, $highlightUuid = false, $rotate = 0, $scale = 1)
{
if ($locationId === false) {
$locationId = Database::queryFirst('SELECT fixedlocationid FROM machine
@@ -215,8 +215,9 @@ class PvsGenerator
self::swap($sizeX, $sizeY);
}
return Render::parse('svg-plan', [
- 'width' => $sizeX,
- 'height' => $sizeY,
+ 'scale' => $scale,
+ 'width' => $sizeX * $scale,
+ 'height' => $sizeY * $scale,
'centerX' => $centerX,
'centerY' => $centerY,
'rotate' => $rotate * 90,