Skip to content

Commit 55e856e

Browse files
author
Friedrich W. H. Kossebau
committed
Ending OpRemoveAnnotation, rerender existing annotations, not refresh all
1 parent 31598d3 commit 55e856e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

webodf/lib/gui/AnnotationViewManager.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ gui.AnnotationViewManager = function AnnotationViewManager(canvas, odfFragment,
243243
} else {
244244
annotationNote.style.top = '0px';
245245
}
246+
} else {
247+
annotationNote.style.top = '0px';
246248
}
247249

248250
connectorAngular.style.left = connectorHorizontal.getBoundingClientRect().width / zoomLevel + 'px';

webodf/lib/ops/OpRemoveAnnotation.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ ops.OpRemoveAnnotation = function OpRemoveAnnotation() {
9292
// The specified position is the first walkable step in the annotation. The position is always just before the first point of change
9393
odtDocument.emit(ops.OdtDocument.signalStepsRemoved, {position: position > 0 ? position - 1 : position});
9494

95-
odtDocument.getOdfCanvas().refreshAnnotations();
96-
// workaround AnnotationViewManager not fixing up cursor positions after creating the highlighting
95+
odtDocument.getOdfCanvas().rerenderAnnotations();
9796
odtDocument.fixCursorPositions();
9897
return true;
9998
};

0 commit comments

Comments
 (0)