VolkovLabs / business-media

The Business Media panel is a Grafana plugin that renders PNG, JPG, GIF, MP4, WEBM, MP3, OGG, and PDF files encoded in the base64 format and URL.
https://docs.volkovlabs.io
Apache License 2.0
24 stars 3 forks source link

Image cannot load depending on (n/m)th image that I am currently looking at #118

Closed hgyoon closed 5 months ago

hgyoon commented 5 months ago

Hello, it might sound confusing by the title so I brought some images. Currently using version 5.0.0 volkov1 I covered the picture because it is personal. Note that when i am at the 10th picture and limit(n:10), there is no problem. But when I change limit to n:9, It does not load. volkov2 But when I load 10 pictures again and look at the 9th picture and try limiting it to n:9 it works again. volkov3 I think there is a problem with the variable that stores the number "n" of the picture that I am looking at so that when the total number of pictures get lesser than n, it causes error. I would appreciate if that value gets reset to 1 whenever a new set of image loads.

hgyoon commented 5 months ago

Thank you for noticing the problem. I would appreciate if the "currentIndex" variable could reset to 1 or the length of array when out of bounds.