typewriterjs
typewriterjs copied to clipboard
Feature Request: Method to ClearAll immediately.
Instead of deleting all the typed characters, DeleteAll just starts deleting the characters one by one. How do I delete all the typed characters in one single moment?
One would expect the DeleteAll
command to do this but it doesn't. However from the discussion below, it seems this "confusing behavior" is intended and won't be fixed. So instead can I recommend a new command "ClearAll" that performs action.
Have you considered using the changeDeleteSpeed()
prop?
It wouldn't make sense for all characters to disappear in one go as it defeats the purpose of a typewriter effect, would it?
I think so, and 0
wasn't fast enough.
It wouldn't make sense for all characters to disappear in one go as it defeats the purpose of a typewriter effect, would it?
That's just a weird thing to say. Forward is great, backward is terrible. If you are only going to delete some characters, then it makes sense to show what you are deleting, but if you want to clear everything, there is just no way to do that. Even if changeDeleteSpeed
worked, basically that would be a huge hack that would require a bunch of changes to make the right thing happen.
The use case, clearAll
, it would seem that is exactly the purpose of deleteAll
from a user perspective, but if the library wants to use those words to mean something else that's fine.
If we want to stand on principle rather than usefulness, then feel free to call a new method: throwPageAway()
, that would work fine for me.
the value of 0 throws back to the natural deleting speed.
try 1
I don't think we are on the same page here, I'm looking for instant delete everything and start over. This is deleteAll(1)
, this is not the same as clear()
.
I understood your requirement clearly. however the issue should be under a different title.
maybe a proposal to include clearAll
feature of it already exists to fix it
i Suggest you close/edit this issue and provide a better brief about what is it that you want
All the details are in this thread, I'm not sure why I would close this issue. That doesn't make any sense.
Same question. I use recursive function in the callFunction to achieve this.
You can try this if you need.