I need help with Masterslider from Averta

I’m using Masterslider in my Divi theme. And I’m using different sizes of one slider for different devices and for portrait and landscape view. So when I switch a device from portrait to landscape, the device has to pick another slider. That it does perfectly. But there is one textlayer in the slider that is centered. When switching from portrait to landscape and vice versa, the textlayer appears on the left of the slider.

The supportteam from Averta said it needed the ‘call update’ javascript method in the divipages where the shortcuts for the slider are. But it isn’t working.

Is anybody familiar with this problem or has a solution?
This is the code they provided me with:
var breakpoints = [480, 640, 768, 854, 1024, 1366];

window.addEventListener(‘resize’, function() {

var bp = breakpoints[breakpoints.length - 1];

breakpoints.every( function( p ) {

if ( window.innerWidth < = p ) {

bp = p;

return false;

}

return true

});

if ( window._last_bp !== bp ) {

window._last_bp = bp;

masterslider_instances.forEach( function( slider ) { slider.api.update(true); } );

}

});

I tried this with, and without

Erwin Zinger