From 28dce3cc8bd85b966e60b171369432d60144ae2b Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 21 Feb 2023 15:44:13 +0100 Subject: [PATCH 1/2] :bug: Fix problem with align center and width 100% --- common/src/app/common/geom/shapes/flex_layout/bounds.cljc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/geom/shapes/flex_layout/bounds.cljc b/common/src/app/common/geom/shapes/flex_layout/bounds.cljc index 6c65c7827..d37dc32f3 100644 --- a/common/src/app/common/geom/shapes/flex_layout/bounds.cljc +++ b/common/src/app/common/geom/shapes/flex_layout/bounds.cljc @@ -78,16 +78,18 @@ (conj (gpt/add base-p (hv min-width))) (and col? h-center?) - (conj (gpt/add base-p (hv (/ min-width 2)))) + (conj (gpt/add base-p (hv (/ min-width 2))) + (gpt/subtract base-p (hv (/ min-width 2)))) - (and col? h-center?) + (and col? h-end?) (conj (gpt/subtract base-p (hv min-width))) (and row? v-start?) (conj (gpt/add base-p (vv min-height))) (and row? v-center?) - (conj (gpt/add base-p (vv (/ min-height 2)))) + (conj (gpt/add base-p (vv (/ min-height 2))) + (gpt/subtract base-p (vv (/ min-height 2)))) (and row? v-end?) (conj (gpt/subtract base-p (vv min-height)))))) From a1f41c80a2368e713877d0932f6b0373c399d8b8 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 22 Feb 2023 10:43:51 +0100 Subject: [PATCH 2/2] :bug: Fix problem with redo curve drawings --- frontend/src/app/main/data/workspace/common.cljs | 2 +- frontend/src/app/main/ui/workspace/viewport.cljs | 2 -- frontend/src/app/main/ui/workspace/viewport/widgets.cljs | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/data/workspace/common.cljs b/frontend/src/app/main/data/workspace/common.cljs index 19f4a4ce3..95eb64076 100644 --- a/frontend/src/app/main/data/workspace/common.cljs +++ b/frontend/src/app/main/data/workspace/common.cljs @@ -87,7 +87,7 @@ (watch [it state _] (let [edition (get-in state [:workspace-local :edition]) drawing (get state :workspace-drawing)] - (when-not (or (some? edition) (not-empty drawing)) + (when (and (nil? edition) (or (empty drawing) (= :curve (:tool drawing)))) (let [undo (:workspace-undo state) items (:items undo) index (or (:index undo) (dec (count items)))] diff --git a/frontend/src/app/main/ui/workspace/viewport.cljs b/frontend/src/app/main/ui/workspace/viewport.cljs index bde29f132..a766ea236 100644 --- a/frontend/src/app/main/ui/workspace/viewport.cljs +++ b/frontend/src/app/main/ui/workspace/viewport.cljs @@ -439,8 +439,6 @@ [:& presence/active-cursors {:page-id page-id}]) - [:& widgets/viewport-actions] - [:& scroll-bars/viewport-scrollbars {:objects base-objects :zoom zoom diff --git a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs index 6b1f42e87..be1d5372e 100644 --- a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs @@ -56,7 +56,8 @@ drawing-obj (:object drawing) shape (or drawing-obj (-> selected first))] (when (or (and (= (count selected) 1) (= (:id shape) edition) (not= :text (:type shape))) - (and (some? drawing-obj) (= :path (:type drawing-obj)))) + (and (some? drawing-obj) (= :path (:type drawing-obj)) + (not= :curve (:tool drawing)))) [:div.viewport-actions [:& path-actions {:shape shape}]])))