diff --git a/packages/text-annotator/src/TextAnnotator.ts b/packages/text-annotator/src/TextAnnotator.ts index 36ec5de6..3692725f 100644 --- a/packages/text-annotator/src/TextAnnotator.ts +++ b/packages/text-annotator/src/TextAnnotator.ts @@ -101,9 +101,6 @@ export const createTextAnnotator = ( selectionHandler.setFilter(filter); }; - const setStyle = (style: HighlightStyleExpression | undefined) => - highlightRenderer.setStyle(style); - const setUser = (user: User) => { currentUser = user; selectionHandler.setUser(user); @@ -124,9 +121,6 @@ export const createTextAnnotator = ( } }; - const setVisible = (visible: boolean) => - highlightRenderer.setVisible(visible); - const destroy = () => { highlightRenderer.destroy(); selectionHandler.destroy(); @@ -141,12 +135,13 @@ export const createTextAnnotator = ( element: container, getUser, setFilter, - setStyle, + setStyle: highlightRenderer.setStyle.bind(highlightRenderer), + redraw: highlightRenderer.redraw.bind(highlightRenderer), redraw: highlightRenderer.redraw.bind(highlightRenderer), setUser, setSelected, setPresenceProvider, - setVisible, + setVisible: highlightRenderer.setVisible.bind(highlightRenderer), on: lifecycle.on, off: lifecycle.off, scrollIntoView: scrollIntoView(container, store),