0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 22:49:01 -05:00

🐛 Fix problem with guides not showing when moving over nested frames

This commit is contained in:
alonso.torres 2023-03-23 17:13:04 +01:00
parent 1657f06a48
commit 5874922367
2 changed files with 8 additions and 5 deletions

View file

@ -51,6 +51,7 @@
- Fix visual problem in select options [Taiga #5028](https://tree.taiga.io/project/penpot/issue/5028)
- Forbid empty names for assets [Taiga #5056](https://tree.taiga.io/project/penpot/issue/5056)
- Select children after ungroup action [Taiga #4917](https://tree.taiga.io/project/penpot/issue/4917)
- Fix problem with guides not showing when moving over nested frames [Taiga #4905](https://tree.taiga.io/project/penpot/issue/4905)
### :heart: Community contributions by (Thank you!)
- To @ondrejkonec: for contributing to the code with:

View file

@ -134,12 +134,14 @@
;; STREAMS
move-stream (mf/use-memo #(rx/subject))
frame-parent (mf/use-memo
guide-frame (mf/use-memo
(mf/deps @hover-ids base-objects)
(fn []
(let [parent (get base-objects (last @hover-ids))]
(when (= :frame (:type parent))
parent))))
(let [parent-id
(->> @hover-ids
(d/seek (partial cph/root-frame? base-objects)))]
(when (some? parent-id)
(get base-objects parent-id)))))
zoom (d/check-num zoom 1)
drawing-tool (:tool drawing)
@ -494,7 +496,7 @@
[:& guides/viewport-guides
{:zoom zoom
:vbox vbox
:hover-frame frame-parent
:hover-frame guide-frame
:disabled-guides? disabled-guides?
:modifiers modifiers}])