Skip to content
Snippets Groups Projects
Commit 562d247e authored by chris's avatar chris
Browse files

fix

parent 974dc1ac
No related branches found
No related tags found
No related merge requests found
......@@ -203,11 +203,6 @@ export default class CommentState {
const ystate = ySyncPluginKey.getState(state);
this.decorations = this.decorations.map(
transaction.mapping,
transaction.doc,
);
if (ystate?.isChangeOrigin) {
this.updateCommentPostions(ystate);
this.createDecorations(state);
......@@ -215,6 +210,20 @@ export default class CommentState {
return this;
}
this.decorations = this.decorations.map(
transaction.mapping,
transaction.doc,
);
map.forEach((annotation, _) => {
if ('from' in annotation && 'to' in annotation) {
annotation.data.pmFrom = transaction.mapping.map(
annotation.data.pmFrom,
);
annotation.data.pmTo = transaction.mapping.map(annotation.data.pmTo);
}
});
if (ystate?.binding && ystate?.binding.mapping) {
this.updateCommentPostions(ystate);
this.createDecorations(state);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment