Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
editoria
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
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
Yannis Barlas
editoria
Commits
9ac0db07
Commit
9ac0db07
authored
8 years ago
by
john
Browse files
Options
Downloads
Patches
Plain Diff
bug fix
parent
ab7b4666
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/components/SimpleEditor/elements/track_change/TrackChangesProvider.js
+9
-6
9 additions, 6 deletions
...impleEditor/elements/track_change/TrackChangesProvider.js
with
9 additions
and
6 deletions
app/components/SimpleEditor/elements/track_change/TrackChangesProvider.js
+
9
−
6
View file @
9ac0db07
...
@@ -182,8 +182,12 @@ class TrackChangesProvider {
...
@@ -182,8 +182,12 @@ class TrackChangesProvider {
const
isOnLeftEdge
=
this
.
isOnLeftEdge
(
annotation
)
const
isOnLeftEdge
=
this
.
isOnLeftEdge
(
annotation
)
const
isOnRightEdge
=
this
.
isOnRightEdge
(
annotation
)
const
isOnRightEdge
=
this
.
isOnRightEdge
(
annotation
)
const
isFromSameUser
=
this
.
isAnnotationFromTheSameUser
(
annotation
)
const
isFromSameUser
=
this
.
isAnnotationFromTheSameUser
(
annotation
)
const
mode
=
this
.
getMode
()
const
key
=
direction
.
key
const
key
=
direction
.
key
// use this variable to throw the flow to the isOnDelete handler underneath
let
pass
=
false
// when on own additions, simply delete the character
// when on own additions, simply delete the character
// unless it is on the edge: then make a deletion annotation
// unless it is on the edge: then make a deletion annotation
...
@@ -193,14 +197,12 @@ class TrackChangesProvider {
...
@@ -193,14 +197,12 @@ class TrackChangesProvider {
(
isOnRightEdge
&&
key
===
'
DELETE
'
)
||
(
isOnRightEdge
&&
key
===
'
DELETE
'
)
||
(
!
isFromSameUser
&&
!
isOnDelete
)
(
!
isFromSameUser
&&
!
isOnDelete
)
)
{
)
{
return
this
.
selectCharacterAndMarkDeleted
(
options
)
if
(
mode
)
return
this
.
selectCharacterAndMarkDeleted
(
options
)
pass
=
true
}
}
if
(
!
isFromSameUser
&&
isOnDelete
)
{
if
(
!
isFromSameUser
&&
isOnDelete
)
pass
=
true
// pass -- jump to 'is on delete' handler underneath
if
(
!
pass
)
return
this
.
deleteCharacter
(
direction
.
move
)
}
else
{
return
this
.
deleteCharacter
(
direction
.
move
)
}
}
}
if
(
isOnDelete
)
{
if
(
isOnDelete
)
{
...
@@ -297,6 +299,7 @@ class TrackChangesProvider {
...
@@ -297,6 +299,7 @@ class TrackChangesProvider {
})
})
each
(
ownAdditions
,
(
annotation
)
=>
{
each
(
ownAdditions
,
(
annotation
)
=>
{
console
.
log
(
annotation
)
const
selection
=
annotation
.
getSelection
()
const
selection
=
annotation
.
getSelection
()
// make sure only the part of the annotation that is selected is deleted
// make sure only the part of the annotation that is selected is deleted
...
...
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