Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fullscreen fix for relative styles

  • Loading branch information...
commit 9c2f32098bd2a8bff7f86a04e2563278d983d357 1 parent 2ce3672
@ansis ansis authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 control/mm/fullscreen.js
View
10 control/mm/fullscreen.js
@@ -12,7 +12,7 @@ wax.mm.fullscreen = function() {
a = document.createElement('a'),
map,
body = document.body,
- smallSize;
+ dimensions;
a.className = 'map-fullscreen';
a.href = '#fullscreen';
@@ -50,10 +50,11 @@ wax.mm.fullscreen = function() {
fullscreen.full = function() {
if (fullscreened) { return; } else { fullscreened = true; }
- smallSize = [map.parent.offsetWidth, map.parent.offsetHeight];
+ dimensions = map.dimensions;
map.parent.className += ' map-fullscreen-map';
body.className += ' map-fullscreen-view';
- map.setSize({ x: map.parent.offsetWidth, y: map.parent.offsetHeight });
+ map.dimensions = { x: map.parent.offsetWidth, y: map.parent.offsetHeight };
+ map.draw();
return fullscreen;
};
@@ -61,7 +62,8 @@ wax.mm.fullscreen = function() {
if (!fullscreened) { return; } else { fullscreened = false; }
map.parent.className = map.parent.className.replace(' map-fullscreen-map', '');
body.className = body.className.replace(' map-fullscreen-view', '');
- map.setSize({ x: smallSize[0], y: smallSize[1] });
+ map.dimensions = dimensions;
+ map.draw();
return fullscreen;
};
Please sign in to comment.
Something went wrong with that request. Please try again.