reorder logic of test for isNaN so that if viewPortPx is null to start with we dont bomb out with error
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1495 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -995,11 +995,11 @@ OpenLayers.Map.prototype = {
|
||||
var dX = -parseInt(this.layerContainerDiv.style.left);
|
||||
var dY = -parseInt(this.layerContainerDiv.style.top);
|
||||
layerPx = viewPortPx.add(dX, dY);
|
||||
if (isNaN(layerPx.x) || isNaN(layerPx.y)) {
|
||||
layerPx = null;
|
||||
}
|
||||
}
|
||||
if (!isNaN(layerPx.x) && !isNaN(layerPx.y)) {
|
||||
return layerPx;
|
||||
}
|
||||
return null;
|
||||
return layerPx;
|
||||
},
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user