mirror of
https://github.com/penpot/penpot.git
synced 2025-07-10 03:07:16 +02:00
🐛 Fix problem with guides not showing when moving over nested frames
This commit is contained in:
parent
1657f06a48
commit
5874922367
2 changed files with 8 additions and 5 deletions
|
@ -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}])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue