mirror of
https://github.com/penpot/penpot.git
synced 2026-10-28 21:40:34 +00:00
🐛 Keep full quality rendering during the v3 text layout preview (#12360)
This commit is contained in:
parent
38a6961ff1
commit
7f53483a32
@ -706,8 +706,9 @@
|
||||
#_:clj-kondo/ignore
|
||||
(defn set-wasm-modifiers
|
||||
[modif-tree & {:keys [ignore-constraints ignore-snap-pixel snap-ignore-axis
|
||||
subtree-ids-by-id selection-rect-cache]
|
||||
:or {ignore-constraints false ignore-snap-pixel false snap-ignore-axis nil}
|
||||
subtree-ids-by-id selection-rect-cache interactive?]
|
||||
:or {ignore-constraints false ignore-snap-pixel false snap-ignore-axis nil
|
||||
interactive? true}
|
||||
:as params}]
|
||||
(let [modif-tree (without-nil-ids modif-tree)]
|
||||
(ptk/reify ::set-wasm-modifiers
|
||||
@ -726,8 +727,10 @@
|
||||
;; the renderer into fast + atlas-backdrop mode so the live
|
||||
;; preview is cheap, tiles never appear sequentially and the main
|
||||
;; thread is not blocked. The pair is closed in
|
||||
;; `clear-local-transform`.
|
||||
(ensure-interactive-transform-start!)
|
||||
;; `clear-local-transform`. Previews outside a gesture pass
|
||||
;; `:interactive? false` to keep full quality rendering.
|
||||
(when interactive?
|
||||
(ensure-interactive-transform-start!))
|
||||
(let [snap-pixel? (and (not ignore-snap-pixel) (contains? (:workspace-layout state) :snap-pixel-grid))
|
||||
translation? (every? #(ctm/only-move? (:modifiers %)) (vals modif-tree))]
|
||||
|
||||
|
||||
@ -1485,7 +1485,8 @@
|
||||
(not (and (mth/close? (:width size) (:width previous))
|
||||
(mth/close? (:height size) (:height previous)))))
|
||||
(rx/of #(assoc-in % [::layout-preview id] size)
|
||||
(dwm/set-wasm-modifiers (dwwt/resize-wasm-text-modifiers shape)))
|
||||
(dwm/set-wasm-modifiers (dwwt/resize-wasm-text-modifiers shape)
|
||||
:interactive? false))
|
||||
(rx/empty))))))
|
||||
|
||||
(defn v3-stop-text-layout-preview
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user