0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-11 01:10:28 -05:00

Merge pull request #2004 from penpot/alotor-bugfixing

1.14 Bugfixes
This commit is contained in:
Andrey Antukh 2022-06-17 08:22:02 +02:00 committed by GitHub
commit c60c04f167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -308,7 +308,7 @@
(assoc-in [:workspace-local :edition] (-> selected first :id)))))))
(defn not-changed? [old-dim new-dim]
(> (mth/abs (- old-dim new-dim)) 0.1))
(> (mth/abs (- old-dim new-dim)) 1))
(defn resize-text
[id new-width new-height]

View file

@ -15,7 +15,7 @@
[thumbnail? node-ref rendered? render-frame?]
(let [;; when `true` the node is in memory
in-memory? (mf/use-var true)
in-memory? (mf/use-state true)
;; State just for re-rendering
re-render (mf/use-state 0)
@ -32,7 +32,7 @@
(reset! parent-ref node)
(swap! re-render inc)))))]
(mf/use-effect
(mf/use-layout-effect
(mf/deps thumbnail? render-frame?)
(fn []
(when (and (some? @parent-ref) (some? @node-ref) @rendered? (and thumbnail? (not render-frame?)))