Use ol.inherits instead of goog.inherits

This commit is contained in:
Frederic Junod
2016-04-07 16:26:11 +02:00
parent 072728b083
commit e289bfbb7d
166 changed files with 448 additions and 452 deletions

View File

@@ -21,11 +21,11 @@ goog.require('ol.proj');
* @api
*/
ol.geom.Circle = function(center, opt_radius, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
var radius = opt_radius ? opt_radius : 0;
this.setCenterAndRadius(center, radius, opt_layout);
};
goog.inherits(ol.geom.Circle, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.Circle, ol.geom.SimpleGeometry);
/**

View File

@@ -58,7 +58,7 @@ ol.geom.GeometryLayout = {
*/
ol.geom.Geometry = function() {
goog.base(this);
ol.Object.call(this);
/**
* @private
@@ -91,7 +91,7 @@ ol.geom.Geometry = function() {
this.simplifiedGeometryRevision = 0;
};
goog.inherits(ol.geom.Geometry, ol.Object);
ol.inherits(ol.geom.Geometry, ol.Object);
/**

View File

@@ -19,7 +19,7 @@ goog.require('ol.object');
*/
ol.geom.GeometryCollection = function(opt_geometries) {
goog.base(this);
ol.geom.Geometry.call(this);
/**
* @private
@@ -29,7 +29,7 @@ ol.geom.GeometryCollection = function(opt_geometries) {
this.listenGeometriesChange_();
};
goog.inherits(ol.geom.GeometryCollection, ol.geom.Geometry);
ol.inherits(ol.geom.GeometryCollection, ol.geom.Geometry);
/**
@@ -301,5 +301,5 @@ ol.geom.GeometryCollection.prototype.translate = function(deltaX, deltaY) {
*/
ol.geom.GeometryCollection.prototype.disposeInternal = function() {
this.unlistenGeometriesChange_();
goog.base(this, 'disposeInternal');
ol.geom.Geometry.prototype.disposeInternal.call(this);
};

View File

@@ -24,7 +24,7 @@ goog.require('ol.geom.flat.simplify');
*/
ol.geom.LinearRing = function(coordinates, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
/**
* @private
@@ -41,7 +41,7 @@ ol.geom.LinearRing = function(coordinates, opt_layout) {
this.setCoordinates(coordinates, opt_layout);
};
goog.inherits(ol.geom.LinearRing, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.LinearRing, ol.geom.SimpleGeometry);
/**

View File

@@ -29,7 +29,7 @@ goog.require('ol.geom.flat.simplify');
*/
ol.geom.LineString = function(coordinates, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
/**
* @private
@@ -58,7 +58,7 @@ ol.geom.LineString = function(coordinates, opt_layout) {
this.setCoordinates(coordinates, opt_layout);
};
goog.inherits(ol.geom.LineString, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.LineString, ol.geom.SimpleGeometry);
/**

View File

@@ -28,7 +28,7 @@ goog.require('ol.geom.flat.simplify');
*/
ol.geom.MultiLineString = function(coordinates, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
/**
* @type {Array.<number>}
@@ -51,7 +51,7 @@ ol.geom.MultiLineString = function(coordinates, opt_layout) {
this.setCoordinates(coordinates, opt_layout);
};
goog.inherits(ol.geom.MultiLineString, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.MultiLineString, ol.geom.SimpleGeometry);
/**

View File

@@ -23,10 +23,10 @@ goog.require('ol.math');
* @api stable
*/
ol.geom.MultiPoint = function(coordinates, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
this.setCoordinates(coordinates, opt_layout);
};
goog.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry);
/**

View File

@@ -33,7 +33,7 @@ goog.require('ol.geom.flat.simplify');
*/
ol.geom.MultiPolygon = function(coordinates, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
/**
* @type {Array.<Array.<number>>}
@@ -80,7 +80,7 @@ ol.geom.MultiPolygon = function(coordinates, opt_layout) {
this.setCoordinates(coordinates, opt_layout);
};
goog.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry);
/**

View File

@@ -19,10 +19,10 @@ goog.require('ol.math');
* @api stable
*/
ol.geom.Point = function(coordinates, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
this.setCoordinates(coordinates, opt_layout);
};
goog.inherits(ol.geom.Point, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.Point, ol.geom.SimpleGeometry);
/**

View File

@@ -33,7 +33,7 @@ goog.require('ol.math');
*/
ol.geom.Polygon = function(coordinates, opt_layout) {
goog.base(this);
ol.geom.SimpleGeometry.call(this);
/**
* @type {Array.<number>}
@@ -80,7 +80,7 @@ ol.geom.Polygon = function(coordinates, opt_layout) {
this.setCoordinates(coordinates, opt_layout);
};
goog.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry);
ol.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry);
/**

View File

@@ -20,7 +20,7 @@ goog.require('ol.object');
*/
ol.geom.SimpleGeometry = function() {
goog.base(this);
ol.geom.Geometry.call(this);
/**
* @protected
@@ -41,7 +41,7 @@ ol.geom.SimpleGeometry = function() {
this.flatCoordinates = null;
};
goog.inherits(ol.geom.SimpleGeometry, ol.geom.Geometry);
ol.inherits(ol.geom.SimpleGeometry, ol.geom.Geometry);
/**