mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 15:01:39 +02:00
Fix many inconsistencies between drawing and resizing.
This enables sharing code between the drawing logic and the simple resizing. Allowing drawing in any direction, not only from top-left to bottom-right. Fixes issue #44.
This commit is contained in:
parent
b7253b7fd5
commit
f82ddac72d
16 changed files with 291 additions and 321 deletions
|
@ -8,6 +8,7 @@
|
|||
(:require [potok.core :as ptk]
|
||||
[cuerdas.core :as str :include-macros true]
|
||||
[uxbox.main.store :as st]
|
||||
[uxbox.main.refs :as refs]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
|
@ -22,8 +23,8 @@
|
|||
(mx/defc path-component
|
||||
{:mixins [mx/static mx/reactive]}
|
||||
[{:keys [id] :as shape}]
|
||||
(let [modifiers (mx/react (common/modifiers-ref id))
|
||||
selected (mx/react common/selected-ref)
|
||||
(let [modifiers (mx/react (refs/selected-modifiers id))
|
||||
selected (mx/react refs/selected-shapes)
|
||||
selected? (contains? selected id)
|
||||
shape (assoc shape
|
||||
:modifiers modifiers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue