mirror of
https://github.com/penpot/penpot.git
synced 2026-09-14 07:59:36 +00:00
🐛 Fix proportions for new layouts
This commit is contained in:
parent
74cc8079bb
commit
4fb1247045
@ -4,7 +4,9 @@
|
|||||||
;;
|
;;
|
||||||
;; Copyright (c) KALEIDOS INC
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
(ns app.common.geom.proportions)
|
(ns app.common.geom.proportions
|
||||||
|
(:require
|
||||||
|
[app.common.data :as d]))
|
||||||
|
|
||||||
;; --- Proportions
|
;; --- Proportions
|
||||||
|
|
||||||
@ -36,7 +38,8 @@
|
|||||||
|
|
||||||
(defn setup-proportions
|
(defn setup-proportions
|
||||||
[{:keys [type] :as shape}]
|
[{: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
|
(cond
|
||||||
(= type :svg-raw) (setup-proportions-size shape)
|
(= type :svg-raw) (setup-proportions-size shape)
|
||||||
(= type :image) (setup-proportions-image shape)
|
(= type :image) (setup-proportions-image shape)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user