0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

Minor cosmetic changes.

This commit is contained in:
Andrey Antukh 2016-01-23 23:13:43 +02:00
parent ee4e8d30b5
commit 746a8196ba
2 changed files with 1 additions and 5 deletions

View file

@ -195,8 +195,6 @@
(update-in state [:shapes-by-id sid] (update-in state [:shapes-by-id sid]
shapes/-rotate rotation)))) shapes/-rotate rotation))))
;; TODO: implement locked resize
(defn update-shape-size (defn update-shape-size
[sid {:keys [width height lock] :as opts}] [sid {:keys [width height lock] :as opts}]
(sc/validate! +shape-update-size-schema+ opts) (sc/validate! +shape-update-size-schema+ opts)

View file

@ -173,9 +173,7 @@
x (apply min (map :x shapes)) x (apply min (map :x shapes))
y (apply min (map :y shapes)) y (apply min (map :y shapes))
x' (apply max (map (fn [{:keys [x width]}] (+ x width)) shapes)) x' (apply max (map (fn [{:keys [x width]}] (+ x width)) shapes))
y' (apply max (map (fn [{:keys [y height]}] (+ y height)) shapes)) y' (apply max (map (fn [{:keys [y height]}] (+ y height)) shapes))]
width (- x' x)
height (- y' y)]
{:width (- x' x) {:width (- x' x)
:height (- y' y) :height (- y' y)
:x x :x x