mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 09:08:31 -05:00
🐛 Fix error on collaboratibe editing
This commit is contained in:
parent
d965736751
commit
a3ead3aa6d
3 changed files with 7 additions and 11 deletions
|
@ -28,12 +28,6 @@
|
||||||
(s/def ::shape-attrs ::cp/shape-attrs)
|
(s/def ::shape-attrs ::cp/shape-attrs)
|
||||||
(s/def ::set-of-string (s/every string? :kind set?))
|
(s/def ::set-of-string (s/every string? :kind set?))
|
||||||
(s/def ::ordered-set-of-uuid (s/every uuid? :kind d/ordered-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
|
;; --- Helpers
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
(ns app.main.data.workspace.notifications
|
(ns app.main.data.workspace.notifications
|
||||||
(:require
|
(:require
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.uri :as u]
|
|
||||||
[app.common.geom.point :as gpt]
|
[app.common.geom.point :as gpt]
|
||||||
[app.common.pages :as cp]
|
[app.common.pages :as cp]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
|
[app.common.uri :as u]
|
||||||
[app.config :as cf]
|
[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.libraries :as dwl]
|
||||||
[app.main.data.workspace.persistence :as dwp]
|
[app.main.data.workspace.persistence :as dwp]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
(let [changes-by-pages (group-by :page-id changes)
|
(let [changes-by-pages (group-by :page-id changes)
|
||||||
process-page-changes
|
process-page-changes
|
||||||
(fn [[page-id changes]]
|
(fn [[page-id changes]]
|
||||||
(dwc/update-indices page-id changes))]
|
(dch/update-indices page-id changes))]
|
||||||
|
|
||||||
(rx/merge
|
(rx/merge
|
||||||
(rx/of (dwp/shapes-changes-persisted file-id msg))
|
(rx/of (dwp/shapes-changes-persisted file-id msg))
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
|
|
||||||
(mf/defc interaction
|
(mf/defc interaction
|
||||||
[{:keys [shape interactions show-interactions?]}]
|
[{: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)
|
(when-not (empty? interactions)
|
||||||
[:rect {:x (- x 1)
|
[:rect {:x (- x 1)
|
||||||
:y (- y 1)
|
:y (- y 1)
|
||||||
|
@ -52,7 +53,8 @@
|
||||||
:stroke "#31EFB8"
|
:stroke "#31EFB8"
|
||||||
:stroke-width (if show-interactions? 1 0)
|
:stroke-width (if show-interactions? 1 0)
|
||||||
:fill-opacity (if show-interactions? 0.2 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
|
(defn generic-wrapper-factory
|
||||||
"Wrap some svg shape and add interaction controls"
|
"Wrap some svg shape and add interaction controls"
|
||||||
|
|
Loading…
Add table
Reference in a new issue