0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-02 04:19:08 -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) - 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) - 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) - 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!) ### :heart: Community contributions by (Thank you!)
- To @ondrejkonec: for contributing to the code with: - To @ondrejkonec: for contributing to the code with:

View file

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