Rename _ol_geom_Point_ to Point

This commit is contained in:
Tim Schaub
2017-12-14 08:49:10 -07:00
parent 75c5a8b246
commit eadec38ae2
76 changed files with 365 additions and 365 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ import _ol_array_ from '../array.js';
import {closestSquaredDistanceXY, containsXY} from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
import _ol_geom_Point_ from '../geom/Point.js';
import Point from '../geom/Point.js';
import _ol_geom_SimpleGeometry_ from '../geom/SimpleGeometry.js';
import _ol_geom_flat_deflate_ from '../geom/flat/deflate.js';
import _ol_geom_flat_inflate_ from '../geom/flat/inflate.js';
@@ -107,7 +107,7 @@ _ol_geom_MultiPoint_.prototype.getPoint = function(index) {
if (index < 0 || n <= index) {
return null;
}
var point = new _ol_geom_Point_(null);
var point = new Point(null);
point.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
index * this.stride, (index + 1) * this.stride));
return point;
@@ -127,7 +127,7 @@ _ol_geom_MultiPoint_.prototype.getPoints = function() {
var points = [];
var i, ii;
for (i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
var point = new _ol_geom_Point_(null);
var point = new Point(null);
point.setFlatCoordinates(layout, flatCoordinates.slice(i, i + stride));
points.push(point);
}
+12 -12
View File
@@ -19,12 +19,12 @@ import _ol_math_ from '../math.js';
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
* @api
*/
var _ol_geom_Point_ = function(coordinates, opt_layout) {
var Point = function(coordinates, opt_layout) {
_ol_geom_SimpleGeometry_.call(this);
this.setCoordinates(coordinates, opt_layout);
};
inherits(_ol_geom_Point_, _ol_geom_SimpleGeometry_);
inherits(Point, _ol_geom_SimpleGeometry_);
/**
@@ -33,8 +33,8 @@ inherits(_ol_geom_Point_, _ol_geom_SimpleGeometry_);
* @override
* @api
*/
_ol_geom_Point_.prototype.clone = function() {
var point = new _ol_geom_Point_(null);
Point.prototype.clone = function() {
var point = new Point(null);
point.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
return point;
};
@@ -43,7 +43,7 @@ _ol_geom_Point_.prototype.clone = function() {
/**
* @inheritDoc
*/
_ol_geom_Point_.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
Point.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
var flatCoordinates = this.flatCoordinates;
var squaredDistance = _ol_math_.squaredDistance(
x, y, flatCoordinates[0], flatCoordinates[1]);
@@ -67,7 +67,7 @@ _ol_geom_Point_.prototype.closestPointXY = function(x, y, closestPoint, minSquar
* @override
* @api
*/
_ol_geom_Point_.prototype.getCoordinates = function() {
Point.prototype.getCoordinates = function() {
return !this.flatCoordinates ? [] : this.flatCoordinates.slice();
};
@@ -75,7 +75,7 @@ _ol_geom_Point_.prototype.getCoordinates = function() {
/**
* @inheritDoc
*/
_ol_geom_Point_.prototype.computeExtent = function(extent) {
Point.prototype.computeExtent = function(extent) {
return createOrUpdateFromCoordinate(this.flatCoordinates, extent);
};
@@ -84,7 +84,7 @@ _ol_geom_Point_.prototype.computeExtent = function(extent) {
* @inheritDoc
* @api
*/
_ol_geom_Point_.prototype.getType = function() {
Point.prototype.getType = function() {
return _ol_geom_GeometryType_.POINT;
};
@@ -93,7 +93,7 @@ _ol_geom_Point_.prototype.getType = function() {
* @inheritDoc
* @api
*/
_ol_geom_Point_.prototype.intersectsExtent = function(extent) {
Point.prototype.intersectsExtent = function(extent) {
return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);
};
@@ -102,7 +102,7 @@ _ol_geom_Point_.prototype.intersectsExtent = function(extent) {
* @inheritDoc
* @api
*/
_ol_geom_Point_.prototype.setCoordinates = function(coordinates, opt_layout) {
Point.prototype.setCoordinates = function(coordinates, opt_layout) {
if (!coordinates) {
this.setFlatCoordinates(_ol_geom_GeometryLayout_.XY, null);
} else {
@@ -121,8 +121,8 @@ _ol_geom_Point_.prototype.setCoordinates = function(coordinates, opt_layout) {
* @param {ol.geom.GeometryLayout} layout Layout.
* @param {Array.<number>} flatCoordinates Flat coordinates.
*/
_ol_geom_Point_.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
this.setFlatCoordinatesInternal(layout, flatCoordinates);
this.changed();
};
export default _ol_geom_Point_;
export default Point;
+2 -2
View File
@@ -7,7 +7,7 @@ import {closestSquaredDistanceXY, getCenter} from '../extent.js';
import _ol_geom_GeometryLayout_ from '../geom/GeometryLayout.js';
import _ol_geom_GeometryType_ from '../geom/GeometryType.js';
import _ol_geom_LinearRing_ from '../geom/LinearRing.js';
import _ol_geom_Point_ from '../geom/Point.js';
import Point from '../geom/Point.js';
import _ol_geom_SimpleGeometry_ from '../geom/SimpleGeometry.js';
import _ol_geom_flat_area_ from '../geom/flat/area.js';
import _ol_geom_flat_closest_ from '../geom/flat/closest.js';
@@ -215,7 +215,7 @@ _ol_geom_Polygon_.prototype.getFlatInteriorPoint = function() {
* @api
*/
_ol_geom_Polygon_.prototype.getInteriorPoint = function() {
return new _ol_geom_Point_(this.getFlatInteriorPoint(), _ol_geom_GeometryLayout_.XYM);
return new Point(this.getFlatInteriorPoint(), _ol_geom_GeometryLayout_.XYM);
};