From 172372d4c099fdf6865bdf5ef6b93ba202b314ab Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 9 Mar 2021 18:18:29 +0100 Subject: [PATCH] :bug: Fix problem with rotation degree input --- CHANGES.md | 1 + frontend/src/app/main/ui/components/numeric_input.cljs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 915473acf..36aa1557d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -25,6 +25,7 @@ - Fix problem with middle mouse button press moving the canvas when not moving mouse [#717](https://github.com/penpot/penpot/issues/717) - Fix problem with masks interactions outside bounds [#718](https://github.com/penpot/penpot/issues/718) - Fix issues with Alt key in distance measurement [#672](https://github.com/penpot/penpot/issues/672) +- Fix problem with rotation degree input [#741](https://github.com/penpot/penpot/issues/741) ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/ui/components/numeric_input.cljs b/frontend/src/app/main/ui/components/numeric_input.cljs index a8161d7d9..11cc46021 100644 --- a/frontend/src/app/main/ui/components/numeric_input.cljs +++ b/frontend/src/app/main/ui/components/numeric_input.cljs @@ -78,10 +78,10 @@ (dom/set-value! (dom/get-target event) new-value)) (and wrap-value? (num? max-val) (num? min-val) (= value max-val) up?) - (dom/set-value! (dom/get-target event) min-val) + (dom/set-value! (dom/get-target event) (dec min-val)) (and wrap-value? (num? min-val) (num? max-val) (= value min-val) down?) - (dom/set-value! (dom/get-target event) max-val)))))) + (dom/set-value! (dom/get-target event) (inc max-val))))))) handle-key-down (mf/use-callback