Rename _ol_geom_Point_ to Point
This commit is contained in:
@@ -10,7 +10,7 @@ import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_MultiLineString_ from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import _ol_geom_MultiPoint_ from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import _ol_geom_Point_ from '../../../../src/ol/geom/Point.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_Draw_ from '../../../../src/ol/interaction/Draw.js';
|
||||
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
||||
@@ -123,7 +123,7 @@ describe('ol.interaction.Draw', function() {
|
||||
var features = source.getFeatures();
|
||||
var geometry = features[0].getGeometry();
|
||||
expect(features[0].getGeometryName()).to.equal('the_geom');
|
||||
expect(geometry).to.be.a(_ol_geom_Point_);
|
||||
expect(geometry).to.be.a(Point);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -172,7 +172,7 @@ describe('ol.interaction.Draw', function() {
|
||||
var features = source.getFeatures();
|
||||
expect(features).to.have.length(1);
|
||||
var geometry = features[0].getGeometry();
|
||||
expect(geometry).to.be.a(_ol_geom_Point_);
|
||||
expect(geometry).to.be.a(Point);
|
||||
expect(geometry.getCoordinates()).to.eql([10, -20]);
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import _ol_events_ from '../../../../src/ol/events.js';
|
||||
import _ol_events_condition_ from '../../../../src/ol/events/condition.js';
|
||||
import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.js';
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_geom_Point_ from '../../../../src/ol/geom/Point.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_Modify_ from '../../../../src/ol/interaction/Modify.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
@@ -152,7 +152,7 @@ describe('ol.interaction.Modify', function() {
|
||||
describe('constructor', function() {
|
||||
it('adds features to the RTree', function() {
|
||||
var feature = new _ol_Feature_(
|
||||
new _ol_geom_Point_([0, 0]));
|
||||
new Point([0, 0]));
|
||||
var features = new _ol_Collection_([feature]);
|
||||
var modify = new _ol_interaction_Modify_({
|
||||
features: features
|
||||
@@ -171,7 +171,7 @@ describe('ol.interaction.Modify', function() {
|
||||
var rbushEntries = modify.rBush_.getAll();
|
||||
expect(rbushEntries.length).to.be(0);
|
||||
|
||||
feature.setGeometry(new _ol_geom_Point_([0, 10]));
|
||||
feature.setGeometry(new Point([0, 10]));
|
||||
rbushEntries = modify.rBush_.getAll();
|
||||
expect(rbushEntries.length).to.be(1);
|
||||
expect(rbushEntries[0].feature).to.be(feature);
|
||||
@@ -179,7 +179,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
it('accepts a source', function() {
|
||||
var feature = new _ol_Feature_(
|
||||
new _ol_geom_Point_([0, 0]));
|
||||
new Point([0, 0]));
|
||||
var source = new _ol_source_Vector_({features: [feature]});
|
||||
var modify = new _ol_interaction_Modify_({source: source});
|
||||
var rbushEntries = modify.rBush_.getAll();
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.js';
|
||||
import _ol_geom_Point_ from '../../../../src/ol/geom/Point.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_LineString_ from '../../../../src/ol/geom/LineString.js';
|
||||
import _ol_interaction_Snap_ from '../../../../src/ol/interaction/Snap.js';
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('ol.interaction.Snap', function() {
|
||||
});
|
||||
|
||||
it('can handle XYZ coordinates', function() {
|
||||
var point = new _ol_Feature_(new _ol_geom_Point_([0, 0, 123]));
|
||||
var point = new _ol_Feature_(new Point([0, 0, 123]));
|
||||
var snapInteraction = new _ol_interaction_Snap_({
|
||||
features: new _ol_Collection_([point])
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import _ol_MapBrowserPointerEvent_ from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_geom_Point_ from '../../../../src/ol/geom/Point.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_interaction_Translate_ from '../../../../src/ol/interaction/Translate.js';
|
||||
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
@@ -28,9 +28,9 @@ describe('ol.interaction.Translate', function() {
|
||||
document.body.appendChild(target);
|
||||
source = new _ol_source_Vector_();
|
||||
features = [new _ol_Feature_({
|
||||
geometry: new _ol_geom_Point_([10, -20])
|
||||
geometry: new Point([10, -20])
|
||||
}), new _ol_Feature_({
|
||||
geometry: new _ol_geom_Point_([20, -30])
|
||||
geometry: new Point([20, -30])
|
||||
})];
|
||||
source.addFeatures(features);
|
||||
var layer = new _ol_layer_Vector_({source: source});
|
||||
@@ -172,7 +172,7 @@ describe('ol.interaction.Translate', function() {
|
||||
simulateEvent('pointerdrag', 50, -40);
|
||||
simulateEvent('pointerup', 50, -40);
|
||||
var geometry = features[0].getGeometry();
|
||||
expect(geometry).to.be.a(_ol_geom_Point_);
|
||||
expect(geometry).to.be.a(Point);
|
||||
expect(geometry.getCoordinates()).to.eql([50, 40]);
|
||||
|
||||
validateEvents(events, [features[0]]);
|
||||
@@ -186,7 +186,7 @@ describe('ol.interaction.Translate', function() {
|
||||
simulateEvent('pointerdrag', 50, -40);
|
||||
simulateEvent('pointerup', 50, -40);
|
||||
var geometry = features[1].getGeometry();
|
||||
expect(geometry).to.be.a(_ol_geom_Point_);
|
||||
expect(geometry).to.be.a(Point);
|
||||
expect(geometry.getCoordinates()).to.eql([20, -30]);
|
||||
|
||||
expect(events).to.be.empty();
|
||||
|
||||
Reference in New Issue
Block a user