base-10 parseInt
This commit is contained in:
@@ -350,8 +350,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
// and translate the layer div as necessary
|
// and translate the layer div as necessary
|
||||||
|
|
||||||
var size = this.map.getSize();
|
var size = this.map.getSize();
|
||||||
var lcX = parseInt(this.map.layerContainerDiv.style.left);
|
var lcX = parseInt(this.map.layerContainerDiv.style.left, 10);
|
||||||
var lcY = parseInt(this.map.layerContainerDiv.style.top);
|
var lcY = parseInt(this.map.layerContainerDiv.style.top, 10);
|
||||||
var x = (lcX - (size.w / 2.)) * (scale - 1);
|
var x = (lcX - (size.w / 2.)) * (scale - 1);
|
||||||
var y = (lcY - (size.h / 2.)) * (scale - 1);
|
var y = (lcY - (size.h / 2.)) * (scale - 1);
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
* {Number} The resolution scale.
|
* {Number} The resolution scale.
|
||||||
*/
|
*/
|
||||||
getResolutionScale: function() {
|
getResolutionScale: function() {
|
||||||
return parseInt(this.div.style.width) / 100;
|
return parseInt(this.div.style.width, 10) / 100;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -830,8 +830,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
var tlLayer = this.grid[0][0].position.clone();
|
var tlLayer = this.grid[0][0].position.clone();
|
||||||
tlLayer.x *= scale;
|
tlLayer.x *= scale;
|
||||||
tlLayer.y *= scale;
|
tlLayer.y *= scale;
|
||||||
tlLayer = tlLayer.add(parseInt(this.div.style.left),
|
tlLayer = tlLayer.add(parseInt(this.div.style.left, 10),
|
||||||
parseInt(this.div.style.top));
|
parseInt(this.div.style.top, 10));
|
||||||
var offsetX = parseInt(this.map.layerContainerDiv.style.left);
|
var offsetX = parseInt(this.map.layerContainerDiv.style.left);
|
||||||
var offsetY = parseInt(this.map.layerContainerDiv.style.top);
|
var offsetY = parseInt(this.map.layerContainerDiv.style.top);
|
||||||
var tlViewPort = tlLayer.add(offsetX, offsetY);
|
var tlViewPort = tlLayer.add(offsetX, offsetY);
|
||||||
|
|||||||
Reference in New Issue
Block a user