0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-25 14:11:33 -05:00

🐛 Fix problems with text synchronization

This commit is contained in:
alonso.torres 2023-03-13 13:09:45 +01:00
parent 4eeef41ed4
commit a56dc25fae

View file

@ -202,17 +202,19 @@
(fn [{:keys [type attr]}]
(and (= :set type) (= attr :position-data)))
add-origin-session-id
(fn [{:keys [] :as op}]
(cond-> op
(position-data-operation? op)
(update :val with-meta {:session-id (:session-id msg)})))
;;add-origin-session-id
;;(fn [{:keys [] :as op}]
;; (cond-> op
;; (position-data-operation? op)
;; (update :val with-meta {:session-id (:session-id msg)})))
update-position-data
(fn [change]
;; Remove the position data from remote operations. Will be changed localy, otherwise
;; creates a strange "out-of-sync" behaviour.
(cond-> change
(= :mod-obj (:type change))
(update :operations #(mapv add-origin-session-id %))))
(update :operations #(d/removev position-data-operation? %))))
process-page-changes
(fn [[page-id changes]]