Skip to content
Snippets Groups Projects
Commit 6c714c29 authored by chris's avatar chris Committed by Yannis Barlas
Browse files

initial track changes

parent 86683c08
No related branches found
No related tags found
No related merge requests found
import { Tool } from 'substance'
class TrackChangeControlTool extends Tool {
getClassNames () {
return 'sm-target-track-change-enable'
}
renderButton ($$) {
const el = super.renderButton($$)
......
import { Tool } from 'substance'
class TrackChangeControlViewTool extends Tool {
getClassNames () {
return 'sm-target-track-change-toggle-view'
}
renderButton ($$) {
const el = super.renderButton($$)
if (this.getViewMode()) el.addClass('track-changes-view-active')
......@@ -15,8 +19,8 @@ class TrackChangeControlViewTool extends Tool {
getViewMode () {
const editor = this.context.editor
const { trackChangesView } = editor.state
return trackChangesView
}
}
......
......@@ -660,7 +660,6 @@ class TrackChangesProvider extends TOCProvider {
getAllExistingTrackAnnotations () {
const editorSession = this.getEditorSession()
// const selectionState = documentSession.getSelectionState()
const selectionState = editorSession.getSelectionState()
const annotations = selectionState.getAnnotationsForType('track-change')
return annotations
......@@ -762,7 +761,7 @@ class TrackChangesProvider extends TOCProvider {
// const lastChange = last(undoneChanges)
// const op = last(lastChange.ops)
//
// const isTrack = op.path[0].split('-').slice(0, -1).join('-') === 'track-change'
// const isTrack = op.path[0].split('-').slice(0, -1).join('-') === 'track-change
}
/*
......
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