diff --git a/common/src/app/common/geom/rect.cljc b/common/src/app/common/geom/rect.cljc index adfa3114cb..62222b707f 100644 --- a/common/src/app/common/geom/rect.cljc +++ b/common/src/app/common/geom/rect.cljc @@ -261,15 +261,17 @@ (make-rect minx miny (- maxx minx) (- maxy miny)))))) (defn center->rect - [point w h] - (when (some? point) - (let [x (dm/get-prop point :x) - y (dm/get-prop point :y)] - (when (d/num? x y w h) - (make-rect (- x (/ w 2)) - (- y (/ h 2)) - w - h))))) + ([point size] + (center->rect point size size)) + ([point w h] + (when (some? point) + (let [x (dm/get-prop point :x) + y (dm/get-prop point :y)] + (when (d/num? x y w h) + (make-rect (- x (/ w 2)) + (- y (/ h 2)) + w + h)))))) (defn s= [a b] diff --git a/frontend/src/app/main/data/workspace/selection.cljs b/frontend/src/app/main/data/workspace/selection.cljs index aac220262a..7e3638292c 100644 --- a/frontend/src/app/main/data/workspace/selection.cljs +++ b/frontend/src/app/main/data/workspace/selection.cljs @@ -141,6 +141,7 @@ objects (wsh/lookup-page-objects state page-id)] (rx/of (dwc/expand-all-parents [id] objects) + :interrupt ::dwsp/interrupt)))))) (defn select-prev-shape diff --git a/frontend/src/app/main/ui/workspace/sidebar/options.cljs b/frontend/src/app/main/ui/workspace/sidebar/options.cljs index c3e4066608..76886baa48 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options.cljs @@ -115,7 +115,7 @@ [:& bool-options] (cond - (d/not-empty? selected-cells) + (and edit-grid? (d/not-empty? selected-cells)) [:& grid-cell/options {:shape (get objects edition) :cells selected-cells}]