mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
🐛 Fix instanciate an object set it in the top frame of a tree
This commit is contained in:
parent
1709f84a14
commit
2ca28721f7
2 changed files with 6 additions and 3 deletions
|
@ -241,7 +241,8 @@
|
|||
frame-id (or force-frame-id
|
||||
(ctst/frame-id-by-position objects
|
||||
(gpt/add orig-pos delta)
|
||||
{:skip-components? true}))
|
||||
{:skip-components? true
|
||||
:bottom-frames? true}))
|
||||
frame-ids-map (volatile! {})
|
||||
|
||||
update-new-shape
|
||||
|
|
|
@ -237,9 +237,11 @@
|
|||
([objects position] (frame-id-by-position objects position nil))
|
||||
([objects position options]
|
||||
(assert (gpt/point? position))
|
||||
(let [top-frame
|
||||
(let [sort-with-options (fn [objects ids]
|
||||
(sort-z-index objects ids options))
|
||||
top-frame
|
||||
(->> (get-frames-ids objects options)
|
||||
(sort-z-index objects)
|
||||
(sort-with-options objects)
|
||||
(d/seek #(and position (gsh/has-point? (get objects %) position))))]
|
||||
(or top-frame uuid/zero))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue