mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 05:18:24 +02:00
✨ Highlight on track hover
This commit is contained in:
parent
495ba6e4a4
commit
322767701c
11 changed files with 134 additions and 41 deletions
|
@ -1088,3 +1088,21 @@
|
|||
new-shapes (into new-shapes (:shapes parent))]
|
||||
|
||||
(assoc parent :shapes (into [] (reverse new-shapes)))))
|
||||
|
||||
(defn shapes-by-row
|
||||
[parent index]
|
||||
(->> (:layout-grid-cells parent)
|
||||
(filter (fn [[_ {:keys [row row-span]}]]
|
||||
(and (>= (inc index) row)
|
||||
(< (inc index) (+ row row-span)))))
|
||||
(map second)
|
||||
(mapcat :shapes)))
|
||||
|
||||
(defn shapes-by-column
|
||||
[parent index]
|
||||
(->> (:layout-grid-cells parent)
|
||||
(filter (fn [[_ {:keys [column column-span]}]]
|
||||
(and (>= (inc index) column)
|
||||
(< (inc index) (+ column column-span)))))
|
||||
(map second)
|
||||
(mapcat :shapes)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue