Skip to content
Snippets Groups Projects
Commit 68fbff14 authored by chris's avatar chris
Browse files

revert

parent 90bb1df7
No related branches found
No related tags found
No related merge requests found
Pipeline #60061 passed with stages
in 32 minutes and 1 second
...@@ -141,10 +141,7 @@ export default class CommentState { ...@@ -141,10 +141,7 @@ export default class CommentState {
this.decorations = DecorationSet.create(state.doc, decorations); this.decorations = DecorationSet.create(state.doc, decorations);
} }
updateCommentPostions(ystate, action) { updateCommentPostions(ystate) {
const { map } = this.options;
const annotationToUpdate = map.get(action?.id);
this.options.map.doc.transact(() => { this.options.map.doc.transact(() => {
this.decorations.find().forEach(deco => { this.decorations.find().forEach(deco => {
const { id } = deco.spec; const { id } = deco.spec;
...@@ -160,10 +157,7 @@ export default class CommentState { ...@@ -160,10 +157,7 @@ export default class CommentState {
); );
const annotation = this.options.map.get(id); const annotation = this.options.map.get(id);
if (annotationToUpdate?.id === annotation.id) {
annotation.data.conversation = action.data.conversation;
annotation.data.title = action.data.title;
}
annotation.from = newFrom; annotation.from = newFrom;
annotation.to = newTo; annotation.to = newTo;
annotation.data.pmFrom = relativePositionToAbsolutePosition( annotation.data.pmFrom = relativePositionToAbsolutePosition(
...@@ -193,11 +187,7 @@ export default class CommentState { ...@@ -193,11 +187,7 @@ export default class CommentState {
this.addComment(action); this.addComment(action);
} }
if (action.type === 'updateComment') { if (action.type === 'updateComment') {
if (ystate?.binding && ystate?.binding.mapping) { this.updateComment(action);
this.updateCommentPostions(ystate, action);
} else {
this.updateComment(action);
}
} }
if (action.type === 'deleteComment') { if (action.type === 'deleteComment') {
this.deleteComment(action.id); this.deleteComment(action.id);
......
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