Merge pull request #1473 from penpot/alotor/bugfixes_fixes

Bugfixes
This commit is contained in:
Andrey Antukh 2022-01-14 13:33:23 +01:00 committed by GitHub
commit 13773d829a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 18 deletions

View file

@ -203,8 +203,7 @@
(mf/deps value-str)
(fn []
(when-let [input-node (mf/ref-val ref)]
(when-not (dom/active? input-node)
(dom/set-value! input-node value-str)))))
(dom/set-value! input-node value-str))))
(mf/use-effect
(mf/deps handle-blur)

View file

@ -49,16 +49,25 @@
[width height]
(if (or resize-x? resize-y?)
(let [pc (-> (gpt/point x y)
(let [pc (cond-> (gpt/point x y)
(some? transform)
(gpt/transform transform)
(some? current-transform)
(gpt/transform current-transform))
pw (-> (gpt/point (+ x width) y)
pw (cond-> (gpt/point (+ x width) y)
(some? transform)
(gpt/transform transform)
(some? current-transform)
(gpt/transform current-transform))
ph (-> (gpt/point x (+ y height))
ph (cond-> (gpt/point x (+ y height))
(some? transform)
(gpt/transform transform)
(some? current-transform)
(gpt/transform current-transform))]
[(gpt/distance pc pw) (gpt/distance pc ph)])
[width height])]