mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -05:00
🐛 Fix nested frame interaction created flow in wrong frame
This commit is contained in:
parent
8ab264af80
commit
131e4f2446
3 changed files with 21 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
- Fix problem with alt getting stuck when alt+tab [Taiga #5013](https://tree.taiga.io/project/penpot/issue/5013)
|
||||
- Fix problem with z positioning of elements [Taiga #5014](https://tree.taiga.io/project/penpot/issue/5014)
|
||||
- Fix problem in Firefox with scroll jumping when changin pages [#3052](https://github.com/penpot/penpot/issues/3052)
|
||||
- Fix nested frame interaction created flow in wrong frame [Taiga #5043](https://tree.taiga.io/project/penpot/issue/5043)
|
||||
|
||||
### :heart: Community contributions by (Thank you!)
|
||||
- To @ondrejkonec: for contributing to the code with:
|
||||
|
|
|
@ -171,6 +171,25 @@
|
|||
(get objects)
|
||||
(get-frame objects)))))
|
||||
|
||||
(defn get-root-frame
|
||||
[objects shape-id]
|
||||
|
||||
(let [frame-id
|
||||
(if (frame-shape? objects shape-id)
|
||||
shape-id
|
||||
(dm/get-in objects [shape-id :frame-id]))
|
||||
|
||||
frame (get objects frame-id)]
|
||||
(cond
|
||||
(or (root? frame) (nil? frame))
|
||||
nil
|
||||
|
||||
(root-frame? frame)
|
||||
frame
|
||||
|
||||
:else
|
||||
(get-root-frame objects (:frame-id frame)))))
|
||||
|
||||
(defn valid-frame-target?
|
||||
[objects parent-id shape-id]
|
||||
(let [shape (get objects shape-id)]
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
(watch [_ state _]
|
||||
(let [page-id (:current-page-id state)
|
||||
objects (wsh/lookup-page-objects state page-id)
|
||||
frame (cph/get-frame objects shape)
|
||||
frame (cph/get-root-frame objects (:id shape))
|
||||
flows (get-in state [:workspace-data
|
||||
:pages-index
|
||||
page-id
|
||||
|
|
Loading…
Add table
Reference in a new issue