Skip to content

Commit

Permalink
Iframe resize for enter/exit fullscreen taken care of by NPMap.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Irwin committed Apr 2, 2014
1 parent d89c3ab commit f7ceca7
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1253,23 +1253,6 @@ function ready() {
}
},
toolsAndSettings: {
hookUpFullScreenControl: function(config) {
var $map = $('#map'),
map = config.L;

map.on('enterfullscreen', function() {
$map.css({
left: 0,
position: 'fixed'
});
});
map.on('exitfullscreen', function() {
$map.css({
left: '268px',
position: 'absolute'
});
});
},
init: function() {
$.each($('#tools-and-settings form'), function(i, form) {
$.each($(form).find('input'), function(j, input) {
Expand Down Expand Up @@ -1297,14 +1280,6 @@ function ready() {
NPMap[value] = checked;
}

if (value === 'fullscreenControl') {
if (checked) {
Builder._afterUpdateCallbacks.fullscreenControl = Builder.ui.steps.toolsAndSettings.hookUpFullScreenControl;
} else {
delete Builder._afterUpdateCallbacks.fullscreenControl;
}
}

Builder.updateMap();
});
});
Expand All @@ -1319,18 +1294,6 @@ function ready() {

if (typeof property !== 'undefined') {
$input.attr('checked', property);

if (name === 'fullscreenControl' && property) {
var interval = setInterval(function() {
var config = getIframeConfig();

if (config && config.L) {
clearInterval(interval);
Builder._afterUpdateCallbacks.fullscreenControl = Builder.ui.steps.toolsAndSettings.hookUpFullScreenControl;
Builder.ui.steps.toolsAndSettings.hookUpFullScreenControl(getIframeConfig());
}
}, 100);
}
}
});
});
Expand Down

0 comments on commit f7ceca7

Please sign in to comment.