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:
parent
74cc8079bb
commit
4fb1247045
1 changed files with 5 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue