🐛 Keep full quality rendering during the v3 text layout preview (#12360)

This commit is contained in:
Elena Torró 2026-10-19 17:17:34 +02:00 committed by GitHub
parent 38a6961ff1
commit 7f53483a32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions

View File

@ -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))]

View File

@ -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