From 9a750bad937e63ac1018e4d646dc5058a58c1087 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 13 Apr 2023 14:15:49 +0200 Subject: [PATCH] :bug: Fix problem with rulers not placing correctly --- CHANGES.md | 6 ++++++ frontend/src/app/main/ui/workspace/viewport/hooks.cljs | 5 ++--- version.txt | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 47c8c35a9..b5a518253 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # CHANGELOG +## 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 diff --git a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs index 84bd54855..240bfbee5 100644 --- a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs @@ -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-cursor [cursor alt? mod? space? panning drawing-tool drawing-path? path-editing? z? workspace-read-only?] (mf/use-effect diff --git a/version.txt b/version.txt index b57fc7228..b9fb27ab4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.18.2 +1.18.3