tweaks and updated docs for #2627
This commit is contained in:
@ -58,11 +58,12 @@ export default class Plugins {
|
||||
|
||||
// Load synchronous scripts
|
||||
scripts.forEach( s => {
|
||||
if (s.id) {
|
||||
this.registerPlugin(s.id, s.plugin);
|
||||
scriptLoadedCallback(s);
|
||||
} else {
|
||||
loadScript( s.src, () => scriptLoadedCallback(s));
|
||||
if( s.id ) {
|
||||
this.registerPlugin( s.id, s.plugin );
|
||||
scriptLoadedCallback( s );
|
||||
}
|
||||
else {
|
||||
loadScript( s.src, () => scriptLoadedCallback(s) );
|
||||
}
|
||||
} );
|
||||
}
|
||||
@ -134,11 +135,12 @@ export default class Plugins {
|
||||
|
||||
if( this.asyncDependencies.length ) {
|
||||
this.asyncDependencies.forEach( s => {
|
||||
if (s.id) {
|
||||
this.registerPlugin(s.id, s.plugin);
|
||||
if (typeof s.plugin.init === 'function') { s.plugin.init(); }
|
||||
if (typeof s.callback === 'function') { s.callback(); }
|
||||
} else {
|
||||
if( s.id ) {
|
||||
this.registerPlugin( s.id, s.plugin );
|
||||
if( typeof s.plugin.init === 'function' ) s.plugin.init();
|
||||
if( typeof s.callback === 'function' ) s.callback();
|
||||
}
|
||||
else {
|
||||
loadScript( s.src, s.callback );
|
||||
}
|
||||
} );
|
||||
|
@ -10,6 +10,6 @@ export const isAndroid = /android/gi.test( UA );
|
||||
|
||||
// Flags if we should use zoom instead of transform to scale
|
||||
// up slides. Zoom produces crisper results but has a lot of
|
||||
// xbrowser quirks so we only use it in whitelsited browsers.
|
||||
// xbrowser quirks so we only use it in whitelisted browsers.
|
||||
export const supportsZoom = 'zoom' in testElement.style && !isMobile &&
|
||||
( isChrome || /Version\/[\d\.]+.*Safari/.test( UA ) );
|
Reference in New Issue
Block a user