mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
Merge pull request #3166 from penpot/hiru-frame-titles
✨ Hide frame titles for component copies
This commit is contained in:
commit
4f471f39da
2 changed files with 5 additions and 4 deletions
|
@ -110,7 +110,7 @@
|
|||
(defn get-frames
|
||||
"Retrieves all frame objects as vector"
|
||||
([objects] (get-frames objects nil))
|
||||
([objects {:keys [skip-components?] :or {skip-components? false}}]
|
||||
([objects {:keys [skip-components? skip-copies?] :or {skip-components? false skip-copies? false}}]
|
||||
(->> (or (-> objects meta ::index-frames)
|
||||
(let [lookup (d/getf objects)
|
||||
xform (comp (remove #(= uuid/zero %))
|
||||
|
@ -118,8 +118,8 @@
|
|||
(filter cph/frame-shape?))]
|
||||
(->> (keys objects)
|
||||
(into [] xform))))
|
||||
(filter #(or (not skip-components?)
|
||||
(not (ctk/instance-root? %)))))))
|
||||
(remove #(or (and skip-components? (ctk/instance-root? %))
|
||||
(and skip-copies? (and (ctk/instance-root? %) (not (ctk/main-instance? %)))))))))
|
||||
|
||||
(defn get-frames-ids
|
||||
"Retrieves all frame ids as vector"
|
||||
|
|
|
@ -176,7 +176,8 @@
|
|||
on-frame-enter (unchecked-get props "on-frame-enter")
|
||||
on-frame-leave (unchecked-get props "on-frame-leave")
|
||||
on-frame-select (unchecked-get props "on-frame-select")
|
||||
shapes (ctt/get-frames objects)
|
||||
components-v2 (mf/use-ctx ctx/components-v2)
|
||||
shapes (ctt/get-frames objects {:skip-copies? components-v2})
|
||||
shapes (if (debug? :shape-titles)
|
||||
(into (set shapes)
|
||||
(map (d/getf objects))
|
||||
|
|
Loading…
Add table
Reference in a new issue