Highlight on track hover

This commit is contained in:
alonso.torres 2023-09-11 14:14:22 +02:00
parent 495ba6e4a4
commit 322767701c
11 changed files with 134 additions and 41 deletions

View file

@ -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)))