0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

🐛 Fix code generation for areas

This commit is contained in:
alonso.torres 2023-10-05 12:40:57 +02:00
parent a45bc0177b
commit 950fd60917

View file

@ -280,9 +280,14 @@
[_ shape _] [_ shape _]
(:layout-grid-columns shape)) (:layout-grid-columns shape))
(defn area-cell?
[{:keys [position area-name]}]
(and (= position :area) (d/not-empty? area-name)))
(defmethod get-value :grid-template-areas (defmethod get-value :grid-template-areas
[_ shape _] [_ shape _]
(when (ctl/grid-layout? shape) (when (and (ctl/grid-layout? shape)
(some area-cell? (vals (:layout-grid-cells shape))))
(let [result (let [result
(->> (d/enumerate (:layout-grid-rows shape)) (->> (d/enumerate (:layout-grid-rows shape))
(map (map