Redefine ol.Size to be Array.<number>

This commit is contained in:
Frederic Junod
2013-05-31 16:24:47 +02:00
parent 1d7ca27e61
commit a1a7e21f92
33 changed files with 139 additions and 157 deletions

View File

@@ -290,8 +290,8 @@ ol.renderer.Layer.prototype.createGetTileIfLoadedFunction =
ol.renderer.Layer.prototype.snapCenterToPixel =
function(center, resolution, size) {
return [
resolution * (Math.round(center[0] / resolution) + (size.width % 2) / 2),
resolution * (Math.round(center[1] / resolution) + (size.height % 2) / 2)
resolution * (Math.round(center[0] / resolution) + (size[0] % 2) / 2),
resolution * (Math.round(center[1] / resolution) + (size[1] % 2) / 2)
];
};