JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/297733
Change subject: Remove unnecessary router.isSupported() check ...................................................................... Remove unnecessary router.isSupported() check Bug: T139554 Change-Id: I2641e7f83c89c715b73e4aeb1d22bf0d4166d0a7 --- M modules/live/FullScreenControl.js M modules/mapframe/mapframe.js 2 files changed, 1 insertion(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/33/297733/1 diff --git a/modules/live/FullScreenControl.js b/modules/live/FullScreenControl.js index 3137fd9..05dd4d0 100644 --- a/modules/live/FullScreenControl.js +++ b/modules/live/FullScreenControl.js @@ -15,9 +15,6 @@ this.map = map; this.map.on( 'moveend', this.onMapMove, this ); - if ( !router.isSupported() ) { - L.DomEvent.addListener( this.link, 'click', this.onShowFullScreen, this ); - } L.DomEvent.disableClickPropagation( container ); this.updateHash(); @@ -36,11 +33,6 @@ updateHash: function () { var hash = mw.kartographer.getMapHash( this.options.mapData, this.map ); this.link.href = '#' + hash; - }, - - onShowFullScreen: function ( e ) { - L.DomEvent.stop( e ); - mw.kartographer.openFullscreenMap( this.map, kartographer.getMapPosition( this.map ) ); } } ); } )( require( 'ext.kartographer.init' ), require( 'mediawiki.router' ) ); diff --git a/modules/mapframe/mapframe.js b/modules/mapframe/mapframe.js index 0214d5d..c759ee5 100644 --- a/modules/mapframe/mapframe.js +++ b/modules/mapframe/mapframe.js @@ -110,11 +110,7 @@ mw.kartographer.maps[ index ] = map; $container.on( 'dblclick', function () { - if ( router.isSupported() ) { - router.navigate( kartographer.getMapHash( mapData, map ) ); - } else { - kartographer.openFullscreenMap( map, kartographer.getMapPosition( map ) ); - } + router.navigate( kartographer.getMapHash( mapData, map ) ); } ); // Special case for collapsible maps. -- To view, visit https://gerrit.wikimedia.org/r/297733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2641e7f83c89c715b73e4aeb1d22bf0d4166d0a7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: master Gerrit-Owner: JGirault <julien.inbox.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits