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:
parent
48cb96221e
commit
9f512abaeb
1 changed files with 15 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue