fix(editor): display of embedded drawing

See-also #9533
This commit is contained in:
Andelf
2023-08-02 18:05:39 +08:00
committed by Tienson Qin
parent 4b4b4e8871
commit bc4b09d877

View File

@@ -41,7 +41,10 @@
nil
(.. el -classList (contains "block-content"))
(let [width (.-clientWidth el)]
(let [client-width (.-clientWidth el)
width (if (zero? client-width)
(.-width (.-getBoundingClientRect el))
client-width)]
(reset! (::draw-width state) width))
:else