From d355e3b2dc7d15cf701845de434df4e21c76dc7a Mon Sep 17 00:00:00 2001 From: yannis <yannisbarlas@gmail.com> Date: Thu, 30 Mar 2017 23:02:27 +0300 Subject: [PATCH] comment out unnecessary functions from provider --- .../track_change/TrackChangesProvider.js | 40 ++++++++----------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/app/components/SimpleEditor/elements/track_change/TrackChangesProvider.js b/app/components/SimpleEditor/elements/track_change/TrackChangesProvider.js index be28e3c..c20679d 100644 --- a/app/components/SimpleEditor/elements/track_change/TrackChangesProvider.js +++ b/app/components/SimpleEditor/elements/track_change/TrackChangesProvider.js @@ -472,12 +472,6 @@ class TrackChangesProvider extends TOCProvider { // // get all pieces of free text // } - // prevent substance from running getBoundingRectangle, - // as we will unset the selection manually - getInfo () { - return { skipSelection: true } - } - isAnnotationFromTheSameUser (annotation) { const annotationUser = this.getAnnotationUser(annotation) const currentUser = this.getCurrentUser() @@ -560,12 +554,12 @@ class TrackChangesProvider extends TOCProvider { */ - isAnnotationContainedWithinSelection (annotation, strict) { - const selection = this.getSelection() - const annotationSelection = annotation.getSelection() - - return selection.contains(annotationSelection, strict) - } + // isAnnotationContainedWithinSelection (annotation, strict) { + // const selection = this.getSelection() + // const annotationSelection = annotation.getSelection() + // + // return selection.contains(annotationSelection, strict) + // } isSelectionCollapsed () { const selection = this.getSelection() @@ -605,17 +599,17 @@ class TrackChangesProvider extends TOCProvider { surface.editorSession.setSelection(selection) } - setSelectionPlusOne (direction) { - const selection = this.getSelection() - const surface = this.getSurface() - - if (direction === 'left') selection.start.offset -= 1 - if (direction === 'right') selection.end.offset += 1 - - surface.editorSession.setSelection(selection) - - return selection - } + // setSelectionPlusOne (direction) { + // const selection = this.getSelection() + // const surface = this.getSurface() + // + // if (direction === 'left') selection.start.offset -= 1 + // if (direction === 'right') selection.end.offset += 1 + // + // surface.editorSession.setSelection(selection) + // + // return selection + // } updateSelection (selection, startOffset, endOffset) { const surface = this.getSurface() -- GitLab