www.spaceplanner.app

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

commit 099469040ff4b58e2498482d228e70bb89a41652
parent 39e598d91fec5c26e0793d2936a8652339fe9001
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Wed,  9 Oct 2024 19:27:15 -0700

Add pointmapLength method to editor

Diffstat:
Mfiles/floorplans/floorplan/editor.js | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/files/floorplans/floorplan/editor.js b/files/floorplans/floorplan/editor.js @@ -834,6 +834,15 @@ export class FloorplanEditor { } return null } + + pointmapLength(map) { + map = this.backend.reqObj(getID(map)) + let a = this.backend.reqObj(map.a) + a = new Vector2(a.x, a.y) + let b = this.backend.reqObj(map.b) + b = new Vector2(b.x, b.y) + return a.distanceTo(b) + } } function layoutID(name) {