mirror of
https://github.com/penpot/penpot.git
synced 2025-04-05 19:41:27 -05:00
🐛 Fix wrong interaction between comments and panning modes
This commit is contained in:
parent
1dc6464974
commit
93726cf8fe
4 changed files with 16 additions and 14 deletions
CHANGES.md
frontend/src/app/main
|
@ -25,6 +25,7 @@
|
|||
- Fix style for team invite in deutsch [Taiga #4614](https://tree.taiga.io/project/penpot/issue/4614)
|
||||
- Fix problem with text edition in Safari [Taiga #4046](https://tree.taiga.io/project/penpot/issue/4046)
|
||||
- Fix show outline with rounded corners on rects [Taiga #4053](https://tree.taiga.io/project/penpot/issue/4053)
|
||||
- Fix wrong interaction between comments and panning modes [Taiga #4297](https://tree.taiga.io/project/penpot/issue/4297)
|
||||
- Fix bad element positioning on interaction with fixed scroll [Github #2660](https://github.com/penpot/penpot/issues/2660)
|
||||
- Fix display type of component library not persistent [Taiga #4512](https://tree.taiga.io/project/penpot/issue/4512)
|
||||
|
||||
|
|
|
@ -38,6 +38,10 @@
|
|||
(->> stream
|
||||
(rx/filter ms/mouse-click?)
|
||||
(rx/switch-map #(rx/take 1 ms/mouse-position))
|
||||
(rx/with-latest-from ms/keyboard-space)
|
||||
(rx/tap prn)
|
||||
(rx/filter (fn [[_ space]] (not space)) )
|
||||
(rx/map first)
|
||||
(rx/map handle-comment-layer-click)
|
||||
(rx/take-until stoper))
|
||||
(->> stream
|
||||
|
|
|
@ -104,11 +104,17 @@
|
|||
:on-blur on-blur
|
||||
:on-focus on-focus
|
||||
:on-change on-change}]
|
||||
(when (or @show-buttons?
|
||||
(seq @content))
|
||||
(when (or @show-buttons? (seq @content))
|
||||
[:div.buttons
|
||||
[:input.btn-primary {:type "button" :value "Post" :on-click on-submit :disabled (str/empty-or-nil? @content)}]
|
||||
[:input.btn-secondary {:type "button" :value "Cancel" :on-click on-cancel}]])]))
|
||||
[:input.btn-primary
|
||||
{:type "button"
|
||||
:value "Post"
|
||||
:on-click on-submit
|
||||
:disabled (str/empty-or-nil? @content)}]
|
||||
[:input.btn-secondary
|
||||
{:type "button"
|
||||
:value "Cancel"
|
||||
:on-click on-cancel}]])]))
|
||||
|
||||
(mf/defc draft-thread
|
||||
[{:keys [draft zoom on-cancel on-submit position-modifier]}]
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
middle-click? (and (not panning) (= 2 (.-which event)))]
|
||||
|
||||
(cond
|
||||
middle-click?
|
||||
(or middle-click? (and left-click? @space?))
|
||||
(do
|
||||
(dom/prevent-default bevent)
|
||||
(if mod?
|
||||
|
@ -85,15 +85,6 @@
|
|||
(when-not workspace-read-only?
|
||||
(st/emit! (dwdp/handle-area-selection shift?)))
|
||||
|
||||
(and @space? mod?)
|
||||
(let [raw-pt (dom/get-client-position event)
|
||||
viewport (mf/ref-val viewport-ref)
|
||||
pt (utils/translate-point-to-viewport viewport zoom raw-pt)]
|
||||
(st/emit! (dw/start-zooming pt)))
|
||||
|
||||
@space?
|
||||
(st/emit! (dw/start-panning))
|
||||
|
||||
drawing-tool
|
||||
(when-not workspace-read-only?
|
||||
(st/emit! (dd/start-drawing drawing-tool)))
|
||||
|
|
Loading…
Add table
Reference in a new issue