From fdf3f1b6f01266cc00925e01c67c824045a8d1e3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 2 Mar 2017 16:14:12 +0100 Subject: [PATCH] Add the ability to create a point instance from hash-map. --- frontend/src/uxbox/util/geom/point.cljs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/uxbox/util/geom/point.cljs b/frontend/src/uxbox/util/geom/point.cljs index 7add1510a..27af79e90 100644 --- a/frontend/src/uxbox/util/geom/point.cljs +++ b/frontend/src/uxbox/util/geom/point.cljs @@ -31,6 +31,9 @@ (seq? v)) (Point. (first v) (second v)) + (map? v) + (Point. (:x v) (:y v)) + (number? v) (Point. v v)