0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

📎 Fix function naming

Rename `all-frames-by-position` to `get-frames-by-position`
This commit is contained in:
Andrey Antukh 2023-08-25 11:08:11 +02:00 committed by Andrés Moya
parent 9cc7f3c600
commit ec1c1fcd2f

View file

@ -274,13 +274,13 @@
(let [frame-id (frame-id-by-position objects position options)]
(get objects frame-id))))
(defn all-frames-by-position
([objects position] (all-frames-by-position objects position nil))
(defn get-frames-by-position
([objects position] (get-frames-by-position objects position nil))
([objects position options]
(->> (get-frames objects options)
(filter #(and ^boolean (some? position)
^boolean (gsh/has-point? % position)))
(sort-z-index-objets objects))))
(sort-z-index-objects objects))))
(defn top-nested-frame
"Search for the top nested frame for positioning shapes when moving or creating.
@ -292,7 +292,7 @@
([objects position excluded]
(assert (or (nil? excluded) (set? excluded)))
(let [frames (cond->> (all-frames-by-position objects position)
(let [frames (cond->> (get-frames-by-position objects position)
(some? excluded)
(remove (fn [obj]
(let [id (dm/get-prop obj :id)]