0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐛 Fix proportions for new layouts

This commit is contained in:
alonso.torres 2024-02-21 15:58:31 +01:00 committed by Andrey Antukh
parent 74cc8079bb
commit 4fb1247045

View file

@ -4,7 +4,9 @@
;;
;; Copyright (c) KALEIDOS INC
(ns app.common.geom.proportions)
(ns app.common.geom.proportions
(:require
[app.common.data :as d]))
;; --- Proportions
@ -36,7 +38,8 @@
(defn setup-proportions
[{:keys [type] :as shape}]
(let [image-fill? (every? #(some? (:fill-image %)) (:fills shape))]
(let [image-fill? (and (d/not-empty? (:fills shape))
(every? #(some? (:fill-image %)) (:fills shape)))]
(cond
(= type :svg-raw) (setup-proportions-size shape)
(= type :image) (setup-proportions-image shape)