0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 10:38:13 -05:00

🐛 Fixes scroll and others

This commit is contained in:
alonso.torres 2020-12-10 11:26:11 +01:00 committed by Hirunatan
parent 6cb2f1663e
commit 83519e8513
3 changed files with 10 additions and 4 deletions

View file

@ -171,7 +171,7 @@ $width-settings-bar: 16rem;
.tool-window-content {
display: flex;
flex-direction: column;
// overflow-y: auto;
overflow-y: auto;
height: 100%;
width: 100%;
}

View file

@ -25,11 +25,14 @@
children (obj/get props "children")
render-id (mf/use-memo #(str (uuid/next)))
filter-id (str "filter_" render-id)
styles (cond-> (obj/new)
(:blocked shape) (obj/set! "pointerEvents" "none"))
group-props (-> (obj/clone props)
(obj/without ["shape" "children"])
(obj/set! "id" (str "shape-" (:id shape)))
(obj/set! "className" (str "shape " (:type shape)))
(obj/set! "filter" (filters/filter-str filter-id shape)))]
(obj/set! "filter" (filters/filter-str filter-id shape))
(obj/set! "style" styles))]
[:& (mf/provider muc/render-ctx) {:value render-id}
[:> :g group-props
[:defs

View file

@ -233,7 +233,9 @@
ctrl? (kbd/ctrl? event)
shift? (kbd/shift? event)
alt? (kbd/alt? event)]
(st/emit! (ms/->MouseEvent :down ctrl? shift? alt?))
(when (= 1 (.-which event))
(st/emit! (ms/->MouseEvent :down ctrl? shift? alt?)))
(cond
(and (= 1 (.-which event)) (not edition))
(if drawing-tool
@ -259,7 +261,8 @@
ctrl? (kbd/ctrl? event)
shift? (kbd/shift? event)
alt? (kbd/alt? event)]
(st/emit! (ms/->MouseEvent :up ctrl? shift? alt?))
(when (= 1 (.-which event))
(st/emit! (ms/->MouseEvent :up ctrl? shift? alt?)))
(when (= 2 (.-which event))
(do