Rename _ol_geom_Polygon_ to Polygon
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import * as _ol_extent_ from '../../../../src/ol/extent.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_DragZoom_ from '../../../../src/ol/interaction/DragZoom.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_render_Box_ from '../../../../src/ol/render/Box.js';
|
||||
@@ -72,7 +72,7 @@ describe('ol.interaction.DragZoom', function() {
|
||||
|
||||
var box = new _ol_render_Box_();
|
||||
var extent = [-110, 40, -90, 60];
|
||||
box.geometry_ = _ol_geom_Polygon_.fromExtent(extent);
|
||||
box.geometry_ = Polygon.fromExtent(extent);
|
||||
interaction.box_ = box;
|
||||
|
||||
interaction.onBoxEnd();
|
||||
@@ -94,7 +94,7 @@ describe('ol.interaction.DragZoom', function() {
|
||||
|
||||
var box = new _ol_render_Box_();
|
||||
var extent = [-11.25, -11.25, 11.25, 11.25];
|
||||
box.geometry_ = _ol_geom_Polygon_.fromExtent(extent);
|
||||
box.geometry_ = Polygon.fromExtent(extent);
|
||||
interaction.box_ = box;
|
||||
|
||||
map.getView().setResolution(0.25);
|
||||
|
||||
@@ -11,7 +11,7 @@ import MultiLineString from '../../../../src/ol/geom/MultiLineString.js';
|
||||
import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
|
||||
import _ol_geom_MultiPolygon_ from '../../../../src/ol/geom/MultiPolygon.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import 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';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
@@ -551,7 +551,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_Polygon_);
|
||||
expect(geometry).to.be.a(Polygon);
|
||||
|
||||
expect(geometry.getCoordinates()).to.eql([
|
||||
[[10, -20], [30, -20], [40, -10], [10, -20]]
|
||||
@@ -629,7 +629,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_Polygon_);
|
||||
expect(geometry).to.be.a(Polygon);
|
||||
|
||||
expect(geometry.getCoordinates()).to.eql([
|
||||
[[10, -20], [30, -20], [40, -10], [10, -20]]
|
||||
@@ -653,7 +653,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_Polygon_);
|
||||
expect(geometry).to.be.a(Polygon);
|
||||
|
||||
expect(geometry.getCoordinates()).to.eql([
|
||||
[[10, -20], [30, -20], [40, -10], [10, -20]]
|
||||
@@ -988,7 +988,7 @@ describe('ol.interaction.Draw', function() {
|
||||
|
||||
var features = source.getFeatures();
|
||||
var geometry = features[0].getGeometry();
|
||||
expect(geometry).to.be.a(_ol_geom_Polygon_);
|
||||
expect(geometry).to.be.a(Polygon);
|
||||
var coordinates = geometry.getCoordinates();
|
||||
expect(coordinates[0].length).to.eql(5);
|
||||
expect(coordinates[0][0][0]).to.roughlyEqual(20, 1e-9);
|
||||
@@ -1017,7 +1017,7 @@ describe('ol.interaction.Draw', function() {
|
||||
|
||||
var features = source.getFeatures();
|
||||
var geometry = features[0].getGeometry();
|
||||
expect(geometry).to.be.a(_ol_geom_Polygon_);
|
||||
expect(geometry).to.be.a(Polygon);
|
||||
var coordinates = geometry.getCoordinates();
|
||||
expect(coordinates[0]).to.have.length(5);
|
||||
expect(geometry.getArea()).to.equal(400);
|
||||
|
||||
@@ -8,7 +8,7 @@ import _ol_events_condition_ from '../../../../src/ol/events/condition.js';
|
||||
import _ol_geom_Circle_ from '../../../../src/ol/geom/Circle.js';
|
||||
import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
import Point from '../../../../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import 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';
|
||||
import _ol_pointer_PointerEvent_ from '../../../../src/ol/pointer/PointerEvent.js';
|
||||
@@ -35,7 +35,7 @@ describe('ol.interaction.Modify', function() {
|
||||
|
||||
features = [
|
||||
new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[0, 0], [10, 20], [0, 40], [40, 40], [40, 0]]
|
||||
])
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import _ol_MapBrowserEventType_ from '../../../../src/ol/MapBrowserEventType.js';
|
||||
import _ol_MapBrowserPointerEvent_ from '../../../../src/ol/MapBrowserPointerEvent.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_Interaction_ from '../../../../src/ol/interaction/Interaction.js';
|
||||
import _ol_interaction_Select_ from '../../../../src/ol/interaction/Select.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
@@ -29,7 +29,7 @@ describe('ol.interaction.Select', function() {
|
||||
style.height = height + 'px';
|
||||
document.body.appendChild(target);
|
||||
|
||||
var geometry = new _ol_geom_Polygon_([[[0, 0], [0, 40], [40, 40], [40, 0]]]);
|
||||
var geometry = new Polygon([[[0, 0], [0, 40], [40, 40], [40, 0]]]);
|
||||
|
||||
// Four overlapping features, two features of type "foo" and two features
|
||||
// of type "bar". The rendering order is, from top to bottom, foo -> bar
|
||||
|
||||
Reference in New Issue
Block a user