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