0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-15 08:21:40 -05:00

Merge pull request #3197 from penpot/azazeln28-fix-rules-rendering

🐛 Fix rules rendering
This commit is contained in:
Alejandro 2023-05-08 11:56:28 +02:00 committed by GitHub
commit cf0a42c6eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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]