mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 09:04:02 +02:00
set centerzoom before drawing map
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
iD.Map = function(context) {
|
||||
var dimensions = [],
|
||||
var dimensions = [1, 1],
|
||||
dispatch = d3.dispatch('move', 'drawn'),
|
||||
projection = d3.geo.mercator().scale(1024),
|
||||
roundedProjection = iD.svg.RoundProjection(projection),
|
||||
@@ -148,6 +148,9 @@ iD.Map = function(context) {
|
||||
}
|
||||
|
||||
function redraw(difference) {
|
||||
|
||||
if (!surface) return;
|
||||
|
||||
clearTimeout(timeoutId);
|
||||
|
||||
// If we are in the middle of a zoom/pan, we can't do differenced redraws.
|
||||
|
||||
+8
-8
@@ -17,6 +17,14 @@ iD.ui = function(context) {
|
||||
|
||||
if (iD.detect().opera) container.classed('opera', true);
|
||||
|
||||
var hash = iD.behavior.Hash(context);
|
||||
|
||||
hash();
|
||||
|
||||
if (!hash.hadHash) {
|
||||
map.centerZoom([-77.02271, 38.90085], 20);
|
||||
}
|
||||
|
||||
var m = container.append('div')
|
||||
.attr('id', 'map')
|
||||
.call(map);
|
||||
@@ -123,14 +131,6 @@ iD.ui = function(context) {
|
||||
d3.select(document)
|
||||
.call(keybinding);
|
||||
|
||||
var hash = iD.behavior.Hash(context);
|
||||
|
||||
hash();
|
||||
|
||||
if (!hash.hadHash) {
|
||||
map.centerZoom([-77.02271, 38.90085], 20);
|
||||
}
|
||||
|
||||
context.enter(iD.modes.Browse(context));
|
||||
|
||||
context.container()
|
||||
|
||||
Reference in New Issue
Block a user