0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-01 20:09:04 -05:00

Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2023-04-13 16:34:22 +02:00
commit ce341a05e1
3 changed files with 12 additions and 6 deletions

View file

@ -14,6 +14,12 @@
### :heart: Community contributions by (Thank you!)
## 1.18.3
### :bug: Bugs fixed
- Fix problem with rulers not placing correctly [Taiga #5093](https://tree.taiga.io/project/penpot/issue/5093)
## 1.18.2
### :bug: Bugs fixed

View file

@ -130,6 +130,9 @@
objects (wsh/lookup-page-objects state page-id)
ordered-indexes (cph/order-by-indexed-shapes objects shapes)
parent-id (get-in objects [frame-id :parent-id])
ordered-indexes (->> ordered-indexes (remove #(= % parent-id)))
to-move-shapes (map (d/getf objects) ordered-indexes)
changes
@ -138,9 +141,7 @@
(pcb/with-objects objects)
(cond-> (not (ctl/any-layout? objects frame-id))
(pcb/update-shapes ordered-indexes ctl/remove-layout-item-data))
(pcb/update-shapes ordered-indexes #(cond-> %
(and (cph/frame-shape? %) (not= (:parent-id %) uuid/zero))
(assoc :hide-in-viewer true)))
(pcb/update-shapes ordered-indexes #(cond-> % (cph/frame-shape? %) (assoc :hide-in-viewer true)))
(pcb/change-parent frame-id to-move-shapes 0)
(cond-> (ctl/grid-layout? objects frame-id)
(pcb/update-shapes [frame-id] ctl/assign-cells))))]

View file

@ -59,10 +59,9 @@
(fn []
(when-not vport
(let [node (mf/ref-val viewport-ref)
prnt (dom/get-parent node)
size (dom/get-client-size prnt)]
prnt (dom/get-parent node)]
;; We schedule the event so it fires after `initialize-page` event
(timers/schedule #(st/emit! (dw/initialize-viewport size))))))))
(timers/schedule #(st/emit! (dw/initialize-viewport (dom/get-client-size prnt)))))))))
(defn setup-page-loaded [page-id]