Skip to content

Commit 468ef76

Browse files
committed
block negative scale temporarily
1 parent 04b8e01 commit 468ef76

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,12 @@
205205
offset (cond-> offset in-place (mat/mul 2))
206206
dimensions (bounds/->dimensions bounds)
207207
ratio (mat/div (mat/add dimensions offset) dimensions)
208-
ratio (cond-> ratio ratio-locked (lock-ratio handle))]
208+
ratio (cond-> ratio ratio-locked (lock-ratio handle))
209+
;; TODO: Handle negative ratio.
210+
ratio (mapv #(max % 0.01) ratio)]
209211
(-> db
210212
(assoc :pivot-point pivot-point)
211-
;; TODO: Handle negative ratio.
212-
(element.h/scale (mapv abs ratio) pivot-point recursive))))
213+
(element.h/scale ratio pivot-point recursive))))
213214

214215
(mx/defn select-element
215216
[db, multiple :- boolean?]

0 commit comments

Comments
 (0)