I create a photoBrowser standalone to view different sets of up to 5 images. And when I have opened it 4-5 times to view the different sets the images gets blurry and if I close that set and open it again, then it is sharp.
I have tried to destroy the photoBrowser every time it is closed and Im also setting transform: translate3d(0,0,0); on the images but it still gets blurry images after a couple of times.
So how can I fix this?
Any input appreciated, thanks.
You must destroy the photobrowser instance. If you hide the one already created and create another, identical redundant code will be generated in your html page. You must destroy it with photobrowser.destroy ()
If you use the closed photobrowser event you will not be able to destroy the photobrowser object instance with its own event. You have to destroy the object from a separate function Instantiating the object globally.
Thanks, I have tested with this.destroy() and it is not working.
I have also tested to have myPhotoBrowserPopup.destroy() in a separate function but no luck.
closed: function () {
destroypopup()
}
function destroypopup(){
myPhotoBrowserPopup.destroy()
}
Any other things I can test? I can´t think of anything else.
I even tried to remove the photobrowser completly by removing the div but it is still not working!?
So with this it is removing the div before it opens a new one, but still it´s gets blurry!?
closed: function () {
destroypopup()
}
function destroypopup(){
$('.photo-browser-popup').remove();
//myPhotoBrowserPopup.destroy()
console.log('destroypopup')
}
Thanks, I tested but not working. I don´t understand why removing the div completly doesn´t work, since it is loading it from scratch every time when I do that!? I don´t know what to test now, I have now more ideas.