Fix 'scale' and 'translate' tests

This commit is contained in:
Frederic Junod
2014-03-26 13:40:13 +01:00
parent b59fa4e8af
commit 429a256fff

View File

@@ -94,7 +94,7 @@ ol.format.TopoJSON.concatenateArcs_ = function(indices, arcs) {
ol.format.TopoJSON.readPointGeometry_ =
function(object, scale, translate) {
var coordinates = object.coordinates;
if (goog.isDef(scale) && goog.isDef(translate)) {
if (!goog.isNull(scale) && !goog.isNull(translate)) {
ol.format.TopoJSON.transformVertex_(coordinates, scale, translate);
}
return new ol.geom.Point(coordinates);
@@ -114,7 +114,7 @@ ol.format.TopoJSON.readMultiPointGeometry_ = function(object, scale,
translate) {
var coordinates = object.coordinates;
var i, ii;
if (goog.isDef(scale) && goog.isDef(translate)) {
if (!goog.isNull(scale) && !goog.isNull(translate)) {
for (i = 0, ii = coordinates.length; i < ii; ++i) {
ol.format.TopoJSON.transformVertex_(coordinates[i], scale, translate);
}