mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05:00
Merge pull request #1099 from penpot/fix-vertical-resize
🐛 Fix vertical resize when nested shapes
This commit is contained in:
commit
b483513fa8
3 changed files with 8 additions and 8 deletions
|
@ -60,7 +60,7 @@
|
|||
(a/close! output)))
|
||||
|
||||
(defn- send-mattermost-notification!
|
||||
[cfg {:keys [host version id] :as cdata}]
|
||||
[cfg {:keys [host id] :as cdata}]
|
||||
(try
|
||||
(let [uri (:uri cfg)
|
||||
text (str "Unhandled exception (host: " host ", url: " (cfg/get :public-uri) "/dbg/error-by-id/" id "\n"
|
||||
|
|
|
@ -597,10 +597,8 @@
|
|||
(assoc :resize-origin (:resize-origin parent-modifiers)
|
||||
:resize-vector (gpt/point (:x (:resize-vector parent-modifiers)) 1))
|
||||
|
||||
(and (:resize-vector-2 parent-modifiers)
|
||||
(not (mth/close? (:x (:resize-vector-2 parent-modifiers)) 1)))
|
||||
(assoc :resize-origin-2 (:resize-origin-2 parent-modifiers)
|
||||
:resize-vector-2 (gpt/point (:x (:resize-vector-2 parent-modifiers)) 1))
|
||||
;; resize-vector-2 is always for vertical modifiers, so no need to
|
||||
;; check it here.
|
||||
|
||||
(:displacement parent-modifiers)
|
||||
(assoc :displacement
|
||||
|
@ -654,10 +652,12 @@
|
|||
(assoc :resize-origin (:resize-origin parent-modifiers)
|
||||
:resize-vector (gpt/point 1 (:y (:resize-vector parent-modifiers))))
|
||||
|
||||
;; If there is a resize-vector-2, this means that we come from a recursive
|
||||
;; call, and the resize-vector has no vertical data, so we may override it.
|
||||
(and (:resize-vector-2 parent-modifiers)
|
||||
(not (mth/close? (:y (:resize-vector-2 parent-modifiers)) 1)))
|
||||
(assoc :resize-origin-2 (:resize-origin-2 parent-modifiers)
|
||||
:resize-vector-2 (gpt/point 1 (:y (:resize-vector-2 parent-modifiers))))
|
||||
(assoc :resize-origin (:resize-origin-2 parent-modifiers)
|
||||
:resize-vector (gpt/point 1 (:y (:resize-vector-2 parent-modifiers))))
|
||||
|
||||
(:displacement parent-modifiers)
|
||||
(assoc :displacement
|
||||
|
|
|
@ -258,7 +258,7 @@
|
|||
|
||||
(defmethod migrate 11
|
||||
[data]
|
||||
(letfn [(update-object [objects id shape]
|
||||
(letfn [(update-object [objects _id shape]
|
||||
(if (= :frame (:type shape))
|
||||
(d/update-when shape :shapes (fn [shapes]
|
||||
(filterv (fn [id] (contains? objects id)) shapes)))
|
||||
|
|
Loading…
Add table
Reference in a new issue