mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 04:19:08 -05:00
🐛 Fix precision for wrap in flex
This commit is contained in:
parent
af428ab0ae
commit
0c8d8d92ba
3 changed files with 9 additions and 4 deletions
|
@ -73,6 +73,7 @@
|
||||||
- Fix last update project timer update after creating new file [Taiga #5096](https://tree.taiga.io/project/penpot/issue/5096)
|
- Fix last update project timer update after creating new file [Taiga #5096](https://tree.taiga.io/project/penpot/issue/5096)
|
||||||
- Fix dashboard scrolling using 'Page Up' and 'Page Down' [Taiga #5081](https://tree.taiga.io/project/penpot/issue/5081)
|
- Fix dashboard scrolling using 'Page Up' and 'Page Down' [Taiga #5081](https://tree.taiga.io/project/penpot/issue/5081)
|
||||||
- Fix view mode header buttons overlapping in small resolutions [Taiga #5058](https://tree.taiga.io/project/penpot/issue/5058)
|
- Fix view mode header buttons overlapping in small resolutions [Taiga #5058](https://tree.taiga.io/project/penpot/issue/5058)
|
||||||
|
- Fix precision for wrap in flex [Taiga #5072](https://tree.taiga.io/project/penpot/issue/5072)
|
||||||
|
|
||||||
### :heart: Community contributions by (Thank you!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
- To @ondrejkonec: for contributing to the code with:
|
- To @ondrejkonec: for contributing to the code with:
|
||||||
|
|
|
@ -104,8 +104,10 @@
|
||||||
|
|
||||||
(if (and (some? line-data)
|
(if (and (some? line-data)
|
||||||
(or (not wrap?)
|
(or (not wrap?)
|
||||||
(and row? (<= next-line-min-width layout-width))
|
(and row? (or (< next-line-min-width layout-width)
|
||||||
(and col? (<= next-line-min-height layout-height))))
|
(mth/close? next-line-min-width layout-width 0.5)))
|
||||||
|
(and col? (or (< next-line-min-height layout-height)
|
||||||
|
(mth/close? next-line-min-height layout-height 0.5)))))
|
||||||
|
|
||||||
(recur {:line-min-width (if row? (+ line-min-width next-min-width) (max line-min-width next-min-width))
|
(recur {:line-min-width (if row? (+ line-min-width next-min-width) (max line-min-width next-min-width))
|
||||||
:line-max-width (if row? (+ line-max-width next-max-width) (max line-max-width next-max-width))
|
:line-max-width (if row? (+ line-max-width next-max-width) (max line-max-width next-max-width))
|
||||||
|
|
|
@ -185,8 +185,10 @@
|
||||||
|
|
||||||
(defn close?
|
(defn close?
|
||||||
"Equality for float numbers. Check if the difference is within a range"
|
"Equality for float numbers. Check if the difference is within a range"
|
||||||
[num1 num2]
|
([num1 num2]
|
||||||
(<= (abs (- num1 num2)) float-equal-precision))
|
(close? num1 num2 float-equal-precision))
|
||||||
|
([num1 num2 precision]
|
||||||
|
(<= (abs (- num1 num2)) precision)))
|
||||||
|
|
||||||
(defn lerp
|
(defn lerp
|
||||||
"Calculates a the linear interpolation between two values and a given percent"
|
"Calculates a the linear interpolation between two values and a given percent"
|
||||||
|
|
Loading…
Add table
Reference in a new issue