Yurik has uploaded a new change for review.
https://gerrit.wikimedia.org/r/310590
Change subject: Map should take viewport width/height instead of body
width/height
......................................................................
Map should take viewport width/height instead of body width/height
Bug: T145521
Change-Id: If164ea9de10f5288899bf9401d0aff9d1ea244de
(cherry picked from commit 278a29d9eeadf8b477cb792893dcd32909bce81e)
---
M modules/box/Map.js
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer
refs/changes/90/310590/1
diff --git a/modules/box/Map.js b/modules/box/Map.js
index 564f8a1..0caf4f4 100644
--- a/modules/box/Map.js
+++ b/modules/box/Map.js
@@ -8,7 +8,7 @@
* @class Kartographer.Box.MapClass
* @extends L.Map
*/
-module.Map = ( function ( mw, OpenFullScreenControl, CloseFullScreenControl,
dataLayerOpts, ScaleControl, topojson, document, undefined ) {
+module.Map = ( function ( mw, OpenFullScreenControl, CloseFullScreenControl,
dataLayerOpts, ScaleControl, topojson, window, undefined ) {
var scale, urlFormat,
mapServer = mw.config.get( 'wgKartographerMapServer' ),
@@ -779,8 +779,8 @@
if ( this.options.fullscreen ) {
this._size = new L.Point(
- document.body.clientWidth,
- document.body.clientHeight
+ window.innerWidth,
+ window.innerHeight
);
return;
}
@@ -886,7 +886,7 @@
module.dataLayerOpts,
module.ScaleControl,
require( 'ext.kartographer.lib.topojson' ),
- document
+ window
);
module.map = ( function ( Map ) {
--
To view, visit https://gerrit.wikimedia.org/r/310590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If164ea9de10f5288899bf9401d0aff9d1ea244de
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.28.0-wmf.19
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: JGirault <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits