Closed conangithub closed 3 years ago
hi, did you manage to find solution for this?
Not yet. Still wait for it.
Can either of you provide a minimal example page with a few Tabs and nothing else for me to work with. I don't have time to learn AdminLte 3 from scratch.
Ok sure.
Here is my code https://codepen.io/conan_code/pen/abWGdQq
At the first tab, imgViewer is working. At the second tab, imgViewer is not working.
The problem is that content is not rendered in a Bootstrap tab until the tab is shown so on hidden tabs the imgViewer2 widget thinks the image size is 0x0. The fix is to not instantiate the widget until the tab is shown. Check out this modification of your code.
https://codepen.io/waynegm/pen/abWKwbM
Unfortunately, not a complete solution as imgViewer2 widget on hidden tabs are not updated during browser window resize.
That's great. You save me.
I am understand. Just put the initialization inside bootstrap shown.bs.tab function.
For the widget on hidden tabs are not updated during resize, I think not a big problem for me. Open the hidden tab, resize it again and the widget would be shown/updated again.
Thank you very much. Stay safe.
Hello. When I put imgViewer2 inside second tab or third tab of AdminLte 3 (Bootstrap 4) Tab, it is not working. When I inspect element, it is working but its image is not loaded. If I put inside first tab that an active tab when page load, it is working well. Please help.
jQuery version 3.3.1 jQuery UI version 1.12.1 Leaflet version 1.3.1