diff --git a/wax-prosemirror-services/src/CommentsService/CommentsService.js b/wax-prosemirror-services/src/CommentsService/CommentsService.js index ea97c9596c21423f29a83907e3d6737ec8f988ff..60668775b01d92c27fb2bf000f6a3eb61eaa9550 100644 --- a/wax-prosemirror-services/src/CommentsService/CommentsService.js +++ b/wax-prosemirror-services/src/CommentsService/CommentsService.js @@ -1,20 +1,14 @@ import { Service } from 'wax-prosemirror-core'; -import * as Y from 'yjs'; import CommentBubbleComponent from './components/ui/comments/CommentBubbleComponent'; import RightArea from './components/RightArea'; import commentMark from './schema/commentMark'; import CommentPlugin from './plugins/CommentPlugin'; -// import CopyPasteCommentPlugin from './plugins/CopyPasteCommentPlugin'; import { CommentDecorationPlugin } from './plugins/CommentDecorationPlugin'; import './comments.css'; export default class CommentsService extends Service { allCommentsFromStates = []; boot() { - // this.app.PmPlugins.add( - // 'copyPasteCommentPlugin', - // CopyPasteCommentPlugin('copyPasteCommentPlugin', this.app.context), - // ); const commentsConfig = this.app.config.get('config.CommentsService'); this.app.PmPlugins.add( diff --git a/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js b/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js index 9d8a21466014c97d3c52dd42ddbf3e2ba798d851..7a6c99c92b7d929c5a0f6daccefea33dc95c8180 100644 --- a/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js +++ b/wax-prosemirror-services/src/CommentsService/plugins/CommentPlugin.js @@ -16,7 +16,6 @@ const getComment = (state, context) => { ); commentData = sortBy(commentData, ['data.pmFrom']); - console.log(commentData, comments); if (commentData.length > 0) { if ( (state.selection.from !== state.selection.to && @@ -24,7 +23,6 @@ const getComment = (state, context) => { (state.selection.from === state.selection.to && last(commentData).data.conversation.length !== 0) ) { - console.log('hereee? acitve'); return last(commentData); } return undefined; diff --git a/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js b/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js index 67664c1cad4d32e81eef639efbed1902afad04e7..5697fcaf240e945ebdf24bef3f17fcdccbd8b34b 100644 --- a/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js +++ b/wax-prosemirror-services/src/CommentsService/plugins/CommentState.js @@ -59,13 +59,10 @@ export default class CommentState { const ystate = ySyncPluginKey.getState(state); - const { map } = this.options; - if (ystate?.binding) { const { doc, type, binding } = ystate; - map.forEach((annotation, id) => { - console.log('in map', annotation); + this.allCommentsList().forEach((annotation, id) => { if (typeof annotation.data.yjsFrom === 'number') { annotation.data.yjsFrom = absolutePositionToRelativePosition( annotation.data.yjsFrom, diff --git a/wax-prosemirror-services/src/YjsService/YjsService.js b/wax-prosemirror-services/src/YjsService/YjsService.js index 6957191abb445f7c119305aaa6bc6cd6be774cc6..8efdbc131a15fcdd45831dcb2b91bef3754d1348 100644 --- a/wax-prosemirror-services/src/YjsService/YjsService.js +++ b/wax-prosemirror-services/src/YjsService/YjsService.js @@ -22,7 +22,6 @@ class YjsService extends Service { if (!configProvider || !configYdoc) { ydoc = new Y.Doc(); provider = new WebsocketProvider(connectionUrl, docIdentifier, ydoc); - console.log(this.app.context); this.app.context.setOption({ currentYdoc: ydoc }); }