commit b90b3b8932668d590dd5b60edb818d4570a6d03b
parent c4704e006c9d608d8e9201b6ffe88b09b0dc7a00
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Wed, 16 Oct 2024 23:43:14 -0700
Add "Fit to view" button to the toolbar
This button fits the floor plan to the viewbox the same as it does
initially.
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js
@@ -193,6 +193,11 @@ function run(editor) {
}
}})
+ toolbar.append(item(ui.button("Fit to view", "Fit the floor plan into view", null, {
+ handlers: { click: function() {
+ editor.fitToView()
+ }}
+ })))
toolbar.append(undoRedo)
toolbar.append(item(addFurn))
toolbar.append(item(checkToggle("Angle snap", {