mirror of
https://github.com/penpot/penpot.git
synced 2025-07-26 03:57:24 +02:00
🐛 Fix problems with text synchronization
This commit is contained in:
parent
4eeef41ed4
commit
a56dc25fae
1 changed files with 8 additions and 6 deletions
|
@ -202,17 +202,19 @@
|
||||||
(fn [{:keys [type attr]}]
|
(fn [{:keys [type attr]}]
|
||||||
(and (= :set type) (= attr :position-data)))
|
(and (= :set type) (= attr :position-data)))
|
||||||
|
|
||||||
add-origin-session-id
|
;;add-origin-session-id
|
||||||
(fn [{:keys [] :as op}]
|
;;(fn [{:keys [] :as op}]
|
||||||
(cond-> op
|
;; (cond-> op
|
||||||
(position-data-operation? op)
|
;; (position-data-operation? op)
|
||||||
(update :val with-meta {:session-id (:session-id msg)})))
|
;; (update :val with-meta {:session-id (:session-id msg)})))
|
||||||
|
|
||||||
update-position-data
|
update-position-data
|
||||||
(fn [change]
|
(fn [change]
|
||||||
|
;; Remove the position data from remote operations. Will be changed localy, otherwise
|
||||||
|
;; creates a strange "out-of-sync" behaviour.
|
||||||
(cond-> change
|
(cond-> change
|
||||||
(= :mod-obj (:type change))
|
(= :mod-obj (:type change))
|
||||||
(update :operations #(mapv add-origin-session-id %))))
|
(update :operations #(d/removev position-data-operation? %))))
|
||||||
|
|
||||||
process-page-changes
|
process-page-changes
|
||||||
(fn [[page-id changes]]
|
(fn [[page-id changes]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue