mirror of
https://github.com/penpot/penpot.git
synced 2025-07-07 07:47:17 +02:00
🐛 Fix different behaviour during image drag
This commit is contained in:
parent
9e940dc042
commit
08c6e9b702
4 changed files with 9 additions and 4 deletions
|
@ -160,8 +160,8 @@
|
|||
;; This stream checks the consecutive mouse positions to do the dragging
|
||||
(->> points
|
||||
(streams/move-points-stream snap-toggled start-position selected-points)
|
||||
(rx/take-until stopper)
|
||||
(rx/map #(move-selected-path-point start-position %)))
|
||||
(rx/map #(move-selected-path-point start-position %))
|
||||
(rx/take-until stopper))
|
||||
(rx/of (apply-content-modifiers)))))))
|
||||
|
||||
(defn- get-displacement
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
(ns app.main.ui.workspace.shapes.path
|
||||
(:require
|
||||
[app.common.path.commands :as upc]
|
||||
[app.main.data.workspace.path.helpers :as helpers]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.ui.shapes.path :as path]
|
||||
[app.main.ui.shapes.shape :refer [shape-container]]
|
||||
|
@ -21,7 +22,11 @@
|
|||
content-modifiers (mf/deref content-modifiers-ref)
|
||||
editing-id (mf/deref refs/selected-edition)
|
||||
editing? (= editing-id (:id shape))
|
||||
shape (update shape :content upc/apply-content-modifiers content-modifiers)]
|
||||
shape (update shape :content upc/apply-content-modifiers content-modifiers)
|
||||
|
||||
[_ new-selrect]
|
||||
(helpers/content->points+selrect shape (:content shape))
|
||||
shape (assoc shape :selrect new-selrect)]
|
||||
|
||||
[:> shape-container {:shape shape
|
||||
:pointer-events (when editing? "none")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue