typewriterjs icon indicating copy to clipboard operation
typewriterjs copied to clipboard

Feature Request - clear/reset the event loop queue

Open kgmyatthu opened this issue 4 years ago • 2 comments

I think the lib is really small, portable yet so powerful. But i think it will even be more powerful if you guys add a feature that could clear/reset the event loop queue.

kgmyatthu avatar Mar 17 '20 21:03 kgmyatthu

As a work around i'm finding this is generally working for me

typewriterRef.current.state.eventQueue = []

In my case I am using the React component and keep a ref to the typewriter object. Setting the eventQueue to empty array does reset the queue. I'm sure there is something wrong with what I'm doing but for now its fine :)

llibdude avatar Apr 29 '21 20:04 llibdude

I never thought of but this should work too....Just a workaround tho....

kgmyatthu avatar May 02 '21 06:05 kgmyatthu