Oh great. Nice to hear. I’d realy looking forward to this feature.
I wrote those two functions.
function hideScrollbar() {
const scrollbarWidth = window.innerWidth - document.body.offsetWidth;
document.body.style.paddingRight = scrollbarWidth + "px";
document.body.style.overflow = "hidden";
var list = document.getElementsByClassName('list-group');
}
function showScrollbar() {
document.body.style.paddingRight = 0;
document.body.style.overflow = "auto";
}
To call them I have edited the photoswipe.js . I call hideScrollbar() in the ‘if(_options.mainClass)’ -clause (line: 920) and showscrollbar() in the ‘destroy: function()’. That’s probably not the most elegant solution, but for now it works.
Anyway a hook for custom functions would be nice either.
I consider that the topic can be closed.
Thank you for your quick response.
I’d like to hide/show the scollbar of the body.