Skip to content
Snippets Groups Projects
Commit 9cb84e93 authored by chris's avatar chris
Browse files

minor correction

parent fd6fd31d
No related branches found
No related tags found
No related merge requests found
...@@ -72,9 +72,9 @@ class TrackChangeComponent extends AnnotationComponent { ...@@ -72,9 +72,9 @@ class TrackChangeComponent extends AnnotationComponent {
deleteNode(tx, { nodeId: nodeId }) deleteNode(tx, { nodeId: nodeId })
if (status === 'delete') self.context.surface.delete(tx, nodeData) if (status === 'delete') self.context.surface.delete(tx, nodeData)
}) })
const nextNodeData = self.buildNodeData(nextNodeId) if (nextNodeId) {
self.context.surface.setSelection(nextNodeData.selection) this.focusToNext(nextNodeId)
self.context.controller.scrollTo(nextNodeId) }
} }
rejectTrackChange () { rejectTrackChange () {
...@@ -90,9 +90,10 @@ class TrackChangeComponent extends AnnotationComponent { ...@@ -90,9 +90,10 @@ class TrackChangeComponent extends AnnotationComponent {
deleteNode(tx, { nodeId: nodeId }) deleteNode(tx, { nodeId: nodeId })
if (status === 'add') self.context.surface.delete(tx, nodeData) if (status === 'add') self.context.surface.delete(tx, nodeData)
}) })
const nextNodeData = self.buildNodeData(nextNodeId)
self.context.surface.setSelection(nextNodeData.selection) if (nextNodeId) {
self.context.controller.scrollTo(nextNodeId) this.focusToNext(nextNodeId)
}
} }
buildNodeData (nodeId) { buildNodeData (nodeId) {
...@@ -139,6 +140,12 @@ class TrackChangeComponent extends AnnotationComponent { ...@@ -139,6 +140,12 @@ class TrackChangeComponent extends AnnotationComponent {
return return
} }
focusToNext (nextNodeId) {
const nextNodeData = this.buildNodeData(nextNodeId)
this.context.surface.setSelection(nextNodeData.selection)
this.context.controller.scrollTo(nextNodeId)
}
sortNodes (nodes) { sortNodes (nodes) {
let trackChanges = clone(nodes) let trackChanges = clone(nodes)
const ds = this.getDocumentSession() const ds = this.getDocumentSession()
......
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