From 746a8196ba9d743c9aa0f2fe365fef784459b213 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 23 Jan 2016 23:13:43 +0200 Subject: [PATCH] Minor cosmetic changes. --- src/uxbox/data/workspace.cljs | 2 -- src/uxbox/shapes.cljs | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/uxbox/data/workspace.cljs b/src/uxbox/data/workspace.cljs index 1ddc67972..868186ef6 100644 --- a/src/uxbox/data/workspace.cljs +++ b/src/uxbox/data/workspace.cljs @@ -195,8 +195,6 @@ (update-in state [:shapes-by-id sid] shapes/-rotate rotation)))) -;; TODO: implement locked resize - (defn update-shape-size [sid {:keys [width height lock] :as opts}] (sc/validate! +shape-update-size-schema+ opts) diff --git a/src/uxbox/shapes.cljs b/src/uxbox/shapes.cljs index dfa38bfc6..238e3bec2 100644 --- a/src/uxbox/shapes.cljs +++ b/src/uxbox/shapes.cljs @@ -173,9 +173,7 @@ x (apply min (map :x shapes)) y (apply min (map :y shapes)) x' (apply max (map (fn [{:keys [x width]}] (+ x width)) shapes)) - y' (apply max (map (fn [{:keys [y height]}] (+ y height)) shapes)) - width (- x' x) - height (- y' y)] + y' (apply max (map (fn [{:keys [y height]}] (+ y height)) shapes))] {:width (- x' x) :height (- y' y) :x x