mirror of
https://github.com/penpot/penpot.git
synced 2025-06-25 00:07:02 +02:00
🐛 Fix some problems with layouts
This commit is contained in:
parent
6cd2c712ab
commit
5d42b9793b
6 changed files with 30 additions and 7 deletions
|
@ -262,10 +262,10 @@
|
|||
|
||||
[x y width height]
|
||||
(if (features/active-feature? @st/state "render-wasm/v1")
|
||||
(let [{:keys [width height]} (wasm.api/text-dimensions shape-id)
|
||||
(let [{:keys [max-width height]} (wasm.api/text-dimensions shape-id)
|
||||
{:keys [x y]} (:selrect shape)]
|
||||
|
||||
[x y width height])
|
||||
[x y max-width height])
|
||||
|
||||
(let [bounds (gst/shape->rect shape)
|
||||
x (mth/min (dm/get-prop bounds :x)
|
||||
|
|
|
@ -620,9 +620,10 @@
|
|||
(let [offset (h/call wasm/internal-module "_get_text_dimensions")
|
||||
heapf32 (mem/get-heap-f32)
|
||||
width (aget heapf32 (mem/ptr8->ptr32 offset))
|
||||
height (aget heapf32 (mem/ptr8->ptr32 (+ offset 4)))]
|
||||
height (aget heapf32 (mem/ptr8->ptr32 (+ offset 4)))
|
||||
max-width (aget heapf32 (mem/ptr8->ptr32 (+ offset 8)))]
|
||||
(h/call wasm/internal-module "_free_bytes")
|
||||
{:width width :height height})))
|
||||
{:width width :height height :max-width max-width})))
|
||||
|
||||
(defn set-view-box
|
||||
[zoom vbox]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue