Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wax-prosemirror
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wax
wax-prosemirror
Commits
e0b04439
Commit
e0b04439
authored
10 months ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
map position
parent
54c13f7d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#60020
passed with stages
Stage:
Stage:
in 3 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wax-prosemirror-services/src/CommentsService/components/ui/comments/CommentBubbleComponent.js
+12
-9
12 additions, 9 deletions
...sService/components/ui/comments/CommentBubbleComponent.js
with
12 additions
and
9 deletions
wax-prosemirror-services/src/CommentsService/components/ui/comments/CommentBubbleComponent.js
+
12
−
9
View file @
e0b04439
...
...
@@ -36,21 +36,24 @@ const CommentBubbleComponent = ({ setPosition, position, group }) => {
event
.
preventDefault
();
const
{
selection
}
=
state
;
if
(
context
.
app
.
config
.
get
(
'
config.YjsService
'
))
{
return
createYjsComments
(
selection
);
}
// if (context.app.config.get('config.YjsService')) {
// return createYjsComments(selection);
// }
const
fromPos
=
state
.
tr
.
mapping
.
map
(
selection
.
from
);
const
toPos
=
state
.
tr
.
mapping
.
map
(
selection
.
to
);
dispatch
(
state
.
tr
.
setMeta
(
CommentDecorationPluginKey
,
{
type
:
'
addComment
'
,
from
:
selection
.
from
,
to
:
selection
.
to
,
from
:
from
Pos
,
to
:
toPos
,
data
:
{
type
:
'
comment
'
,
yjsFrom
:
selection
.
from
,
yjsTo
:
selection
.
to
,
pmFrom
:
selection
.
from
,
pmTo
:
selection
.
to
,
yjsFrom
:
from
Pos
,
yjsTo
:
toPos
,
pmFrom
:
from
Pos
,
pmTo
:
toPos
,
conversation
:
[],
title
:
''
,
group
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment