www.spaceplanner.app

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

commit f9b5af1e3415f5cd9b605c3f34630184dad34959
parent 0500aae9d3b531ab6b2cda729aed16e9360e2b95
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Tue, 13 Aug 2024 13:48:50 -0700

Round points to the nearest whole number

The floorplans are going to be made at real size (in SVG coordinates)
which means 96 points to an inch. That's more than enough precision.

Diffstat:
Mfiles/floorplans/floorplan/backend.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/files/floorplans/floorplan/backend.js b/files/floorplans/floorplan/backend.js @@ -203,7 +203,7 @@ export class FloorplanBackend { throw new Error("Point must have x and y be numbers") } // I suppose point could have other keys, that's okay though - return this.addData("points", point, options) + return this.addData("points", { x: Math.round(point.x), y: Math.round(point.y) }, options) } removePoint(id, options) {