I'm using your plugin for my real-time chat app, and I have implemented a search engine in it (Viber-like, if you use Viber on PC, you will know).
For example, you search for "meeting", the chat has 5 mentions of the word "meeting", and you want to jump one-by-one found phrases. There is only scrollTop(offset) method which doesn't really provide the solution here, except if I do more heavy operations calculating "distance" (in px) between found search terms and then passing the value to scrollTop method.
Do you maybe have any advice on this approach?
Thanks in advance,
Eddie
Currently there is no easy way to do this in PS. I would suggest implementing it, as you said, by calculating offset top of the texts and setting offsetTop to it.
It need for me too.
Hmm, I still think this is not to be implemented in PS. PS is just a scrollbar emulator, not about scrolling action itself. PS use the default scrollTop and scrollLeft, so you may consider using it with other scrolling libraries supporting this feature or implementing it.
I'm really sorry that I cannot help so much. I close this issue now, but I always welcome discussion. Please feel free to leave any comment.
Thanks!
Most helpful comment
Hmm, I still think this is not to be implemented in PS. PS is just a scrollbar emulator, not about scrolling action itself. PS use the default
scrollTopandscrollLeft, so you may consider using it with other scrolling libraries supporting this feature or implementing it.I'm really sorry that I cannot help so much. I close this issue now, but I always welcome discussion. Please feel free to leave any comment.
Thanks!