mirror of
https://github.com/penpot/penpot.git
synced 2025-01-11 01:10:28 -05:00
commit
c60c04f167
2 changed files with 3 additions and 3 deletions
|
@ -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]
|
||||
|
|
|
@ -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?)))
|
||||
|
|
Loading…
Reference in a new issue