mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 03:48:31 +02:00
🐛 Fix problem with fix scrolling on nested elements
This commit is contained in:
parent
916d179009
commit
9a976a8f6e
3 changed files with 10 additions and 2 deletions
|
@ -762,6 +762,13 @@
|
|||
|
||||
(recur frame-id frame-parents (rest selected))))))
|
||||
|
||||
(defn fixed-scroll?
|
||||
[shape]
|
||||
^boolean
|
||||
(and (:fixed-scroll shape)
|
||||
(= (:parent-id shape) (:frame-id shape))
|
||||
(not= (:frame-id shape) uuid/zero)))
|
||||
|
||||
(defn fixed?
|
||||
[objects shape-id]
|
||||
(let [ids-to-check
|
||||
|
@ -772,4 +779,4 @@
|
|||
(take-while #(and (not= % uuid/zero) (not (root-frame? objects %))))))]
|
||||
(boolean
|
||||
(->> ids-to-check
|
||||
(d/seek (fn [id] (dm/get-in objects [id :fixed-scroll])))))))
|
||||
(d/seek (fn [id] () (fixed-scroll? (get objects id))))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue