How to refresh Panorama when sections updated using AJAX (in .NET MVC)
opened this issue · comments
Great project with masses of potential!
I'm having a problem when I dynamically load content into a panorama. In an .NET MVC 4 project I am loading a partial view into the panorama div when the form loads.
If the panorama contained no panorama-section divs when it first loaded then nothing gets displayed in the panorama. If the panorama contained 1 panorama-section div then all content gets loaded into the 1 div no matter how many panorama-section divs are added.
If I load the entire panorama rather then sections into the panorama then content loads correctly but it won't scroll.
Any ideas what is going wrong?
The panorama plugin calculate the panorama-section width at page load (jquery document ready event), so if you load some section content via ajax, you should manually update the panorama-section, for now.
In the upcoming release of version 1.0.0 I'll add a method to refresh the panorama.
Just added in the 1.0.0-alpha1 branch, that soon will be the pushed to master:
$('panorama').panorama('resize');