mirror of
https://github.com/penpot/penpot.git
synced 2025-02-22 23:06:08 -05:00
Merge pull request #3039 from penpot/alotor-fix-text-sync
Fix text sync problems
This commit is contained in:
commit
4661fb26dc
1 changed files with 8 additions and 6 deletions
|
@ -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]]
|
||||
|
|
Loading…
Add table
Reference in a new issue