diff --git a/frontend/src/app/main/data/workspace/common.cljs b/frontend/src/app/main/data/workspace/common.cljs index 10c5b9744..c9f8bfcd8 100644 --- a/frontend/src/app/main/data/workspace/common.cljs +++ b/frontend/src/app/main/data/workspace/common.cljs @@ -28,12 +28,6 @@ (s/def ::shape-attrs ::cp/shape-attrs) (s/def ::set-of-string (s/every string? :kind set?)) (s/def ::ordered-set-of-uuid (s/every uuid? :kind d/ordered-set?)) -;; --- Protocols - -(declare setup-selection-index) -(declare update-indices) -(declare reset-undo) -(declare append-undo) ;; --- Helpers diff --git a/frontend/src/app/main/data/workspace/notifications.cljs b/frontend/src/app/main/data/workspace/notifications.cljs index 6ec98cc44..95afceb6d 100644 --- a/frontend/src/app/main/data/workspace/notifications.cljs +++ b/frontend/src/app/main/data/workspace/notifications.cljs @@ -7,12 +7,12 @@ (ns app.main.data.workspace.notifications (:require [app.common.data :as d] - [app.common.uri :as u] [app.common.geom.point :as gpt] [app.common.pages :as cp] [app.common.spec :as us] + [app.common.uri :as u] [app.config :as cf] - [app.main.data.workspace.common :as dwc] + [app.main.data.workspace.changes :as dch] [app.main.data.workspace.libraries :as dwl] [app.main.data.workspace.persistence :as dwp] [app.main.repo :as rp] @@ -217,7 +217,7 @@ (let [changes-by-pages (group-by :page-id changes) process-page-changes (fn [[page-id changes]] - (dwc/update-indices page-id changes))] + (dch/update-indices page-id changes))] (rx/merge (rx/of (dwp/shapes-changes-persisted file-id msg)) diff --git a/frontend/src/app/main/ui/viewer/shapes.cljs b/frontend/src/app/main/ui/viewer/shapes.cljs index 19e2de04b..54dde52d7 100644 --- a/frontend/src/app/main/ui/viewer/shapes.cljs +++ b/frontend/src/app/main/ui/viewer/shapes.cljs @@ -42,7 +42,8 @@ (mf/defc interaction [{:keys [shape interactions show-interactions?]}] - (let [{:keys [x y width height]} shape] + (let [{:keys [x y width height]} (:selrect shape) + frame? (= :frame (:type shape))] (when-not (empty? interactions) [:rect {:x (- x 1) :y (- y 1) @@ -52,7 +53,8 @@ :stroke "#31EFB8" :stroke-width (if show-interactions? 1 0) :fill-opacity (if show-interactions? 0.2 0) - :style {:pointer-events "none"}}]))) + :style {:pointer-events (when frame? "none")} + :transform (geom/transform-matrix shape)}]))) (defn generic-wrapper-factory "Wrap some svg shape and add interaction controls"