0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-14 02:58:39 -05:00

Fix bug introduced in previous commit.

This commit is contained in:
Andrey Antukh 2016-01-19 18:16:28 +02:00
parent 48cb96221e
commit 9f512abaeb

View file

@ -48,20 +48,21 @@
(defn shapes-selrect-render
[own shapes]
(let [[width height x y] (sh/group-size-and-position shapes)]
(html
[:g.controls
[:rect {:x x :y y :width width :height height
:style {:stroke "black" :fill "transparent"
:stroke-opacity "0.5"}}]
[:circle.top-left (merge default-selection-props
{:cx x :cy y})]
[:circle.top-right (merge default-selection-props
{:cx (+ x width) :cy y})]
[:circle.bottom-left (merge default-selection-props
{:cx x :cy (+ y height)})]
[:circle.bottom-right (merge default-selection-props
{:cx (+ x width) :cy (+ y height)})]])))
(when (seq shapes)
(let [[width height x y] (sh/group-size-and-position shapes)]
(html
[:g.controls
[:rect {:x x :y y :width width :height height
:style {:stroke "black" :fill "transparent"
:stroke-opacity "0.5"}}]
[:circle.top-left (merge default-selection-props
{:cx x :cy y})]
[:circle.top-right (merge default-selection-props
{:cx (+ x width) :cy y})]
[:circle.bottom-left (merge default-selection-props
{:cx x :cy (+ y height)})]
[:circle.bottom-right (merge default-selection-props
{:cx (+ x width) :cy (+ y height)})]]))))
(def ^:static shapes-selrect
(mx/component