Matthias Mullie has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/373073 )
Change subject: Setup missing MMV bootstrap event handlers
......................................................................
Setup missing MMV bootstrap event handlers
Bug: T167730
Change-Id: I039bb0e026af2e3a5546332850a30d1a9c4530af
---
M modules/mmv.3d.head.js
1 file changed, 10 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/3D
refs/changes/73/373073/1
diff --git a/modules/mmv.3d.head.js b/modules/mmv.3d.head.js
index 2285dcd..8fb6823 100644
--- a/modules/mmv.3d.head.js
+++ b/modules/mmv.3d.head.js
@@ -19,6 +19,8 @@
'use strict';
mw.threed.mmv = {
+ mmvBootstrap: null,
+
/**
* @param {jQuery} $image
* @param {jQuery} $link
@@ -57,17 +59,20 @@
*/
open: function ( $image, $link ) {
mw.loader.using( [ 'mmv.bootstrap' ], function () {
- var bootstrap, title;
+ var title;
if ( !mw.mmv.isBrowserSupported() ) {
return;
}
- title = mw.Title.newFromImg( $image );
+ if ( this.mmvBootstrap === null ) {
+ this.mmvBootstrap = new
mw.mmv.MultimediaViewerBootstrap();
+ this.mmvBootstrap.setupEventHandlers();
+ }
- bootstrap = new
mw.mmv.MultimediaViewerBootstrap();
- bootstrap.openImage( $link, title );
- } );
+ title = mw.Title.newFromImg( $image );
+ this.mmvBootstrap.openImage( $link, title );
+ }.bind( this ) );
},
/**
--
To view, visit https://gerrit.wikimedia.org/r/373073
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I039bb0e026af2e3a5546332850a30d1a9c4530af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/3D
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits