mirror of
https://github.com/penpot/penpot.git
synced 2025-07-01 12:47:15 +02:00
restyle shape selected controls
This commit is contained in:
parent
94e23400c3
commit
eabfa50142
2 changed files with 27 additions and 35 deletions
|
@ -11,12 +11,12 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(def ^:const +circle-props+
|
(def ^:const +circle-props+
|
||||||
{:r 5
|
{:r 6
|
||||||
:style {:fillOpacity "0.5"
|
:style {:fillOpacity "1"
|
||||||
:strokeWidth "1px"
|
:strokeWidth "1px"
|
||||||
:vectorEffect "non-scaling-stroke"}
|
:vectorEffect "non-scaling-stroke"}
|
||||||
:fill "#333"
|
:fill "#78dbbe"
|
||||||
:stroke "#333"})
|
:stroke "#3f9d81"})
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Implementation Api
|
;; Implementation Api
|
||||||
|
|
|
@ -52,38 +52,30 @@
|
||||||
[:g.controls
|
[:g.controls
|
||||||
[:rect.main {:x x :y y :width width :height height :stroke-dasharray "5,5"
|
[:rect.main {:x x :y y :width width :height height :stroke-dasharray "5,5"
|
||||||
:style {:stroke "#333" :fill "transparent" :stroke-opacity "1"}}]
|
:style {:stroke "#333" :fill "transparent" :stroke-opacity "1"}}]
|
||||||
[:rect.top
|
[:circle.top
|
||||||
{:fill "#333"
|
(merge uusc/+circle-props+
|
||||||
:on-mouse-up #(on-mouse-up 5 %)
|
{:on-mouse-up #(on-mouse-up 5 %)
|
||||||
:on-mouse-down #(on-mouse-down 5 %)
|
:on-mouse-down #(on-mouse-down 5 %)
|
||||||
:x (- (+ x (/ width 2)) 7)
|
:cx (+ x (/ width 2))
|
||||||
:width 14
|
:cy (- y 2)})]
|
||||||
:height 3
|
[:circle.right
|
||||||
:y (- y 5)}]
|
(merge uusc/+circle-props+
|
||||||
[:rect.right
|
{:on-mouse-up #(on-mouse-up 6 %)
|
||||||
{:fill "#333"
|
|
||||||
:on-mouse-up #(on-mouse-up 6 %)
|
|
||||||
:on-mouse-down #(on-mouse-down 6 %)
|
:on-mouse-down #(on-mouse-down 6 %)
|
||||||
:y (- (+ y (/ height 2)) 7)
|
:cy (+ y (/ height 2))
|
||||||
:width 3
|
:cx (+ x width 1)})]
|
||||||
:height 14
|
[:circle.bottom
|
||||||
:x (+ x width 2)}]
|
(merge uusc/+circle-props+
|
||||||
[:rect.bottom
|
{:on-mouse-up #(on-mouse-up 7 %)
|
||||||
{:fill "#333"
|
|
||||||
:on-mouse-up #(on-mouse-up 7 %)
|
|
||||||
:on-mouse-down #(on-mouse-down 7 %)
|
:on-mouse-down #(on-mouse-down 7 %)
|
||||||
:x (- (+ x (/ width 2)) 7)
|
:cx (+ x (/ width 2))
|
||||||
:width 14
|
:cy (+ y height 2)})]
|
||||||
:height 3
|
[:circle.left
|
||||||
:y (+ y height 2)}]
|
(merge uusc/+circle-props+
|
||||||
[:rect.left
|
{:on-mouse-up #(on-mouse-up 8 %)
|
||||||
{:fill "#333"
|
|
||||||
:on-mouse-up #(on-mouse-up 8 %)
|
|
||||||
:on-mouse-down #(on-mouse-down 8 %)
|
:on-mouse-down #(on-mouse-down 8 %)
|
||||||
:y (- (+ y (/ height 2)) 7)
|
:cy (+ y (/ height 2))
|
||||||
:width 3
|
:cx (- x 3)})]
|
||||||
:height 14
|
|
||||||
:x (- x 5)}]
|
|
||||||
[:circle.top-left
|
[:circle.top-left
|
||||||
(merge uusc/+circle-props+
|
(merge uusc/+circle-props+
|
||||||
{:on-mouse-up #(on-mouse-up 1 %)
|
{:on-mouse-up #(on-mouse-up 1 %)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue