Skip to content

Commit 40ac97a

Browse files
committed
update tree no transform drag-end
1 parent 58d5e32 commit 40ac97a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/renderer/element/impl/container/canvas.cljs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@
9898
(when (and transform-active pivot-point)
9999
[overlay/times pivot-point])])
100100

101-
(when (and (= state :idle)
102-
(or (= tool :edit)
101+
(when (and (or (= tool :edit)
103102
(= primary-tool :edit)))
104103
(for [el selected-elements]
105104
^{:key (str (:id el) "-edit-points")}

src/renderer/tool/impl/base/transform.cljs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@
217217
(m/=> translate [:-> App Vec2D [:maybe Orientation] App])
218218
(defn translate
219219
[db offset axis]
220-
(let [offset (if axis (case axis
221-
:vertical [(first offset) 0]
222-
:horizontal [0 (second offset)])
223-
offset)]
220+
(let [offset (case axis
221+
:vertical [(first offset) 0]
222+
:horizontal [0 (second offset)]
223+
offset)]
224224
(reduce (fn [db id]
225225
(let [container (element.h/parent-container db id)
226226
hovered-svg-k (:id (element.h/hovered-svg db))]
@@ -314,14 +314,14 @@
314314
:select (-> (cond-> db (not (pointer/shift? e)) element.h/deselect)
315315
(reduce-by-area (pointer/alt? e) element.h/select)
316316
(h/dissoc-temp)
317-
(snap.h/update-tree)
318317
(h/explain "Modify selection"))
319318
:translate (h/explain db "Move selection")
320319
:scale (h/explain db "Scale selection")
321320
:clone (h/explain db "Clone selection")
322321
:idle db)
323322
(h/set-state :idle)
324323
(element.h/clear-hovered)
324+
(snap.h/update-tree)
325325
(dissoc :clicked-element :pivot-point)))
326326

327327
(defmethod hierarchy/snapping-bases :transform

0 commit comments

Comments
 (0)