mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
🐛 Fix problem with proportional scaling
This commit is contained in:
parent
5315dc18af
commit
4dac2221e7
3 changed files with 31 additions and 17 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
;;
|
||||||
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
(ns app.common.geom.shapes.effects)
|
(ns app.common.geom.shapes.effects)
|
||||||
|
|
||||||
(defn update-shadow-scale
|
(defn update-shadow-scale
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
;;
|
||||||
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
(ns app.common.geom.shapes.strokes)
|
(ns app.common.geom.shapes.strokes)
|
||||||
|
|
||||||
(defn update-stroke-width
|
(defn update-stroke-width
|
||||||
|
|
|
@ -737,30 +737,32 @@
|
||||||
|
|
||||||
(apply-scale-content
|
(apply-scale-content
|
||||||
[shape value]
|
[shape value]
|
||||||
(cond-> shape
|
;; Scale can only be positive
|
||||||
(cfh/text-shape? shape)
|
(let [value (mth/abs value)]
|
||||||
(update-text-content scale-text-content value)
|
(cond-> shape
|
||||||
|
(cfh/text-shape? shape)
|
||||||
|
(update-text-content scale-text-content value)
|
||||||
|
|
||||||
:always
|
:always
|
||||||
(gsc/update-corners-scale value)
|
(gsc/update-corners-scale value)
|
||||||
|
|
||||||
(d/not-empty? (:strokes shape))
|
(d/not-empty? (:strokes shape))
|
||||||
(gss/update-strokes-width value)
|
(gss/update-strokes-width value)
|
||||||
|
|
||||||
(d/not-empty? (:shadow shape))
|
(d/not-empty? (:shadow shape))
|
||||||
(gse/update-shadows-scale value)
|
(gse/update-shadows-scale value)
|
||||||
|
|
||||||
(some? (:blur shape))
|
(some? (:blur shape))
|
||||||
(gse/update-blur-scale value)
|
(gse/update-blur-scale value)
|
||||||
|
|
||||||
(ctl/flex-layout? shape)
|
(ctl/flex-layout? shape)
|
||||||
(ctl/update-flex-scale value)
|
(ctl/update-flex-scale value)
|
||||||
|
|
||||||
(ctl/grid-layout? shape)
|
(ctl/grid-layout? shape)
|
||||||
(ctl/update-grid-scale value)
|
(ctl/update-grid-scale value)
|
||||||
|
|
||||||
:always
|
:always
|
||||||
(ctl/update-flex-child value)))]
|
(ctl/update-flex-child value))))]
|
||||||
|
|
||||||
(let [remove-children
|
(let [remove-children
|
||||||
(fn [shapes children-to-remove]
|
(fn [shapes children-to-remove]
|
||||||
|
|
Loading…
Reference in a new issue