mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 09:08:31 -05:00
🐛 Fix rules rendering
This commit is contained in:
parent
81fff2b5e8
commit
0214cfa299
2 changed files with 4 additions and 1 deletions
|
@ -35,7 +35,7 @@
|
|||
objects (wsh/lookup-page-objects state page-id)
|
||||
shapes (cph/get-immediate-children objects)
|
||||
srect (gsh/selection-rect shapes)
|
||||
local (assoc local :vport size :zoom 1)]
|
||||
local (assoc local :vport size :zoom 1 :zoom-inverse 1)]
|
||||
(cond
|
||||
(or (not (d/num? (:width srect)))
|
||||
(not (d/num? (:height srect))))
|
||||
|
@ -47,6 +47,7 @@
|
|||
zoom (/ (:width size) (:width srect))]
|
||||
(-> local
|
||||
(assoc :zoom zoom)
|
||||
(assoc :zoom-inverse (/ 1 zoom))
|
||||
(update :vbox merge srect)))
|
||||
|
||||
:else
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
zoom (/ (:width vport) (:width srect))]
|
||||
(-> local
|
||||
(assoc :zoom zoom)
|
||||
(assoc :zoom-inverse (/ 1 zoom))
|
||||
(update :vbox merge srect))))))))))
|
||||
|
||||
(def zoom-to-selected-shape
|
||||
|
@ -103,6 +104,7 @@
|
|||
zoom (/ (:width vport) (:width srect))]
|
||||
(-> local
|
||||
(assoc :zoom zoom)
|
||||
(assoc :zoom-inverse (/ 1 zoom))
|
||||
(update :vbox merge srect)))))))))))
|
||||
|
||||
(defn start-zooming [pt]
|
||||
|
|
Loading…
Add table
Reference in a new issue