mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 13:04:38 -05:00
🐛 Fixes scroll and others
This commit is contained in:
parent
6cb2f1663e
commit
83519e8513
3 changed files with 10 additions and 4 deletions
|
@ -171,7 +171,7 @@ $width-settings-bar: 16rem;
|
||||||
.tool-window-content {
|
.tool-window-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
// overflow-y: auto;
|
overflow-y: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,11 +25,14 @@
|
||||||
children (obj/get props "children")
|
children (obj/get props "children")
|
||||||
render-id (mf/use-memo #(str (uuid/next)))
|
render-id (mf/use-memo #(str (uuid/next)))
|
||||||
filter-id (str "filter_" render-id)
|
filter-id (str "filter_" render-id)
|
||||||
|
styles (cond-> (obj/new)
|
||||||
|
(:blocked shape) (obj/set! "pointerEvents" "none"))
|
||||||
group-props (-> (obj/clone props)
|
group-props (-> (obj/clone props)
|
||||||
(obj/without ["shape" "children"])
|
(obj/without ["shape" "children"])
|
||||||
(obj/set! "id" (str "shape-" (:id shape)))
|
(obj/set! "id" (str "shape-" (:id shape)))
|
||||||
(obj/set! "className" (str "shape " (:type 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}
|
[:& (mf/provider muc/render-ctx) {:value render-id}
|
||||||
[:> :g group-props
|
[:> :g group-props
|
||||||
[:defs
|
[:defs
|
||||||
|
|
|
@ -233,7 +233,9 @@
|
||||||
ctrl? (kbd/ctrl? event)
|
ctrl? (kbd/ctrl? event)
|
||||||
shift? (kbd/shift? event)
|
shift? (kbd/shift? event)
|
||||||
alt? (kbd/alt? 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
|
(cond
|
||||||
(and (= 1 (.-which event)) (not edition))
|
(and (= 1 (.-which event)) (not edition))
|
||||||
(if drawing-tool
|
(if drawing-tool
|
||||||
|
@ -259,7 +261,8 @@
|
||||||
ctrl? (kbd/ctrl? event)
|
ctrl? (kbd/ctrl? event)
|
||||||
shift? (kbd/shift? event)
|
shift? (kbd/shift? event)
|
||||||
alt? (kbd/alt? 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))
|
(when (= 2 (.-which event))
|
||||||
(do
|
(do
|
||||||
|
|
Loading…
Add table
Reference in a new issue