www.spaceplanner.app

Web client to the spaceplanner API
git clone git://jacobedwards.org/www.spaceplanner.app
Log | Files | Refs

commit 8e564eba12c8ae0ccc7ebd8188e7da70e1a5b14f
parent da703a19a715076e6631129b0585a644b39682df
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Sat, 10 Aug 2024 23:22:39 -0700

Show full floorplan on initialization

Diffstat:
Mfiles/floorplans/floorplan/svg.js | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/files/floorplans/floorplan/svg.js b/files/floorplans/floorplan/svg.js @@ -49,11 +49,15 @@ function init() { let size = canvas_size(state) etc.require_id("floorplan").prepend(make_grid(state.units, size.width, size.height)) - //let view = ..XXXJKLDJF - //set_scale(state, view.width / size.width) - set_scale(state, 2) + let view = viewbox(state) + set_scale(state, view.width / size.width) - update_movable(state) + /* + * Already called in set_scale, I suppose set_scale and the like should + * set a flag, and whenever the user interface should be updated (say + * on a timer) call this. + */ + update_transforms(state) } function make_grid(units, width, height) {