diff --git a/js/iD/id.js b/js/iD/id.js index 11ea94ca2..8468694e6 100644 --- a/js/iD/id.js +++ b/js/iD/id.js @@ -1,4 +1,13 @@ var iD = function(container) { + + if (!iD.supported()) { + container.innerHTML = 'This editor is supported in Firefox, Chrome, Safari, Opera, ' + + 'and Internet Explorer 9 and above. Please upgrade your browser ' + + 'or use Potlatch 2 to edit the map.'; + container.style.cssText = 'text-align:center;font-style:italic;'; + return; + } + container = d3.select(container); var m = container.append('div') diff --git a/js/iD/renderer/Map.js b/js/iD/renderer/Map.js index f787012ef..24a14fdc3 100644 --- a/js/iD/renderer/Map.js +++ b/js/iD/renderer/Map.js @@ -1,13 +1,5 @@ iD.Map = function(elem, connection) { - if (!iD.supported()) { - elem.innerHTML = 'This editor is supported in Firefox, Chrome, Safari, Opera, ' + - 'and Internet Explorer 9 and above. Please upgrade your browser ' + - 'or use Potlatch 2 to edit the map.'; - elem.style.cssText = 'text-align:center;font-style:italic;'; - return; - } - var map = {}, dimensions = [], dispatch = d3.dispatch('move', 'update'), @@ -451,11 +443,6 @@ iD.Map = function(elem, connection) { update(); } - // Getters & setters for map state - // ------------------------------- - // The map state can be expressed entirely as the combination - // of a centerpoint and a zoom level. Zoom levels are floating-point - // values, and we express lat, lon points as `{ lat, lon }` objects. function getExtent() { return [projection.invert([0, 0]), projection.invert(dimensions)]; }