Remove goog.isNull in geom classes

This commit is contained in:
Marc Jansen
2015-09-29 15:18:56 +02:00
parent eb5088eb40
commit 3c4e663224
10 changed files with 38 additions and 38 deletions

View File

@@ -258,7 +258,7 @@ ol.geom.SimpleGeometry.prototype.setLayout =
* @api stable
*/
ol.geom.SimpleGeometry.prototype.applyTransform = function(transformFn) {
if (!goog.isNull(this.flatCoordinates)) {
if (this.flatCoordinates) {
transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);
this.changed();
}
@@ -271,7 +271,7 @@ ol.geom.SimpleGeometry.prototype.applyTransform = function(transformFn) {
*/
ol.geom.SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
var flatCoordinates = this.getFlatCoordinates();
if (!goog.isNull(flatCoordinates)) {
if (flatCoordinates) {
var stride = this.getStride();
ol.geom.flat.transform.translate(
flatCoordinates, 0, flatCoordinates.length, stride,
@@ -290,7 +290,7 @@ ol.geom.SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
ol.geom.transformSimpleGeometry2D =
function(simpleGeometry, transform, opt_dest) {
var flatCoordinates = simpleGeometry.getFlatCoordinates();
if (goog.isNull(flatCoordinates)) {
if (!flatCoordinates) {
return null;
} else {
var stride = simpleGeometry.getStride();