Blocking mouse interaction with a SelectionManager enabled TextFlow
Hello, and thank you for taking the time to read my inquiry.
My goal is to display a text flow and highlight certain text spans programmatically without enabling mouse-based selection.
My original solution was to use a trivial subclass of the SelectionManager for my text flow's interaction manager, overriding the mouseUpHandler and mouseDownHandler functions to prevent the default behavior by calling event.preventDefault() and event.stopImmediatePropagation(), but this was unsuccessful. The events passed to these handlers were not cancelable.
A secondary approach was to not use an interaction manager at all and instead change the background color for each target span element and then update the display with textFlow.flowComposer.updateAllControllers(), but this was far too computationally intensive. Since the application will be changing the highlighted selection several times per second, a full refresh is untenably slow.
Is there some better way for me to continue to use the SelectionManager's high-speed updates while blocking mouse-based selection of my text?
