mirror of
https://github.com/penpot/penpot.git
synced 2026-04-30 13:49:06 +00:00
🐛 Fix setting shape size to zero
This commit is contained in:
parent
dac2d31b35
commit
0df420d353
@ -35,6 +35,7 @@
|
||||
- Misleading affordance in saved versions [Taiga #11887](https://tree.taiga.io/project/penpot/issue/11887)
|
||||
- Fix pasting RTF text crashes penpot [Taiga #11717](https://tree.taiga.io/project/penpot/issue/11717)
|
||||
- Fix navigation arrows in Libraries & Templates carousel [Taiga #10609](https://tree.taiga.io/project/penpot/issue/10609)
|
||||
- Fix applying tokens with zero value to size [Taiga #11618](https://tree.taiga.io/project/penpot/issue/11618)
|
||||
|
||||
## 2.9.0
|
||||
|
||||
|
||||
@ -466,7 +466,12 @@
|
||||
(dm/assert! (#{:width :height} attr))
|
||||
(dm/assert! (number? value))
|
||||
|
||||
(let [{:keys [proportion proportion-lock]} shape
|
||||
(let [;; Avoid havig shapes with zero size
|
||||
value (if (< (mth/abs value) 0.01)
|
||||
0.01
|
||||
value)
|
||||
|
||||
{:keys [proportion proportion-lock]} shape
|
||||
size (select-keys (:selrect shape) [:width :height])
|
||||
new-size (if-not (and (not ignore-lock?) proportion-lock)
|
||||
(assoc size attr value)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user