Rename _ol_geom_Polygon_ to Polygon
This commit is contained in:
@@ -5,7 +5,7 @@ import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.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_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
|
||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
|
||||
@@ -46,7 +46,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
}
|
||||
|
||||
function addPolygon(r) {
|
||||
source.addFeature(new _ol_Feature_(new _ol_geom_Polygon_([
|
||||
source.addFeature(new _ol_Feature_(new Polygon([
|
||||
[
|
||||
[center[0] - r, center[1] - r],
|
||||
[center[0] + r, center[1] - r],
|
||||
@@ -494,14 +494,14 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
beforeEach(function() {
|
||||
var src = new _ol_source_Vector_({
|
||||
features: [
|
||||
new _ol_Feature_(new _ol_geom_Polygon_([[
|
||||
new _ol_Feature_(new Polygon([[
|
||||
[-22, 58],
|
||||
[-22, 78],
|
||||
[-9, 78],
|
||||
[-9, 58],
|
||||
[-22, 58]
|
||||
]])),
|
||||
new _ol_Feature_(new _ol_geom_Polygon_([[
|
||||
new _ol_Feature_(new Polygon([[
|
||||
[-9, 58],
|
||||
[-9, 78],
|
||||
[4, 78],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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_render_ from '../../../src/ol/render.js';
|
||||
import _ol_render_VectorContext_ from '../../../src/ol/render/VectorContext.js';
|
||||
import _ol_render_canvas_Immediate_ from '../../../src/ol/render/canvas/Immediate.js';
|
||||
@@ -143,7 +143,7 @@ describe('ol.render', function() {
|
||||
|
||||
vectorContext.setStyle(style);
|
||||
|
||||
vectorContext.drawGeometry(new _ol_geom_Polygon_([
|
||||
vectorContext.drawGeometry(new Polygon([
|
||||
[[25, 25], [75, 25], [75, 75], [25, 75], [25, 25]],
|
||||
[[40, 40], [40, 60], [60, 60], [60, 40], [40, 40]]
|
||||
]));
|
||||
@@ -168,7 +168,7 @@ describe('ol.render', function() {
|
||||
|
||||
vectorContext.setStyle(style);
|
||||
|
||||
vectorContext.drawGeometry(new _ol_geom_Polygon_([
|
||||
vectorContext.drawGeometry(new Polygon([
|
||||
[[25, 25], [75, 25], [75, 75], [25, 75], [25, 25]],
|
||||
[[40, 40], [40, 60], [60, 60], [60, 40], [40, 40]]
|
||||
]));
|
||||
@@ -194,7 +194,7 @@ describe('ol.render', function() {
|
||||
|
||||
vectorContext.setStyle(style);
|
||||
|
||||
vectorContext.drawGeometry(new _ol_geom_Polygon_([
|
||||
vectorContext.drawGeometry(new Polygon([
|
||||
[[25, 25], [75, 25], [75, 75], [25, 75], [25, 25]],
|
||||
[[40, 40], [40, 60], [60, 60], [60, 40], [40, 40]]
|
||||
]));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import _ol_Feature_ from '../../../../src/ol/Feature.js';
|
||||
import _ol_geom_Polygon_ from '../../../../src/ol/geom/Polygon.js';
|
||||
import Polygon from '../../../../src/ol/geom/Polygon.js';
|
||||
import _ol_Map_ from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
@@ -49,7 +49,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
var feature;
|
||||
// rectangle
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, 10], [-20, 20], [-5, 20], [-5, 10], [-20, 10]]
|
||||
])
|
||||
});
|
||||
@@ -60,7 +60,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with 1 hole
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[0, 10], [0, 20], [15, 20], [15, 10], [0, 10]],
|
||||
[[5, 13], [10, 13], [10, 17], [5, 17], [5, 13]]
|
||||
|
||||
@@ -73,7 +73,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with 2 holes
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, -20], [-20, 5], [15, 5], [15, -20], [-20, -20]],
|
||||
[[-18, -18], [-12, -18], [-12, -12], [-18, -12], [-18, -18]],
|
||||
[[5, -18], [12, -18], [12, -12], [5, -12], [5, -18]]
|
||||
@@ -114,7 +114,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
var feature;
|
||||
// rectangle
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, 10], [-20, 20], [-5, 20], [-5, 10], [-20, 10]]
|
||||
])
|
||||
});
|
||||
@@ -125,7 +125,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with 1 hole
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[0, 10], [0, 20], [20, 20], [20, 10], [0, 10]],
|
||||
[[5, 13], [10, 13], [10, 17], [5, 17], [5, 13]]
|
||||
|
||||
@@ -138,7 +138,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with 2 holes
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, -20], [-20, 5], [20, 5], [20, -20], [-20, -20]],
|
||||
[[-12, -3], [-12, -12], [-8, -12], [-8, -3], [-12, -3]],
|
||||
[[0, -12], [13, -12], [13, -3], [0, -3], [0, -12]]
|
||||
@@ -174,7 +174,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
var feature;
|
||||
// rectangle with z-index 2
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, 10], [-20, 20], [-0, 20], [-0, 10], [-20, 10]]
|
||||
])
|
||||
});
|
||||
@@ -186,7 +186,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with z-index 3
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-15, 5], [-15, 15], [5, 15], [5, 5], [-15, 5]]
|
||||
])
|
||||
});
|
||||
@@ -198,7 +198,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with z-index 1
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-10, 0], [-10, 10], [10, 10], [10, 0], [-10, 0]]
|
||||
])
|
||||
});
|
||||
@@ -231,7 +231,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
var feature;
|
||||
// rectangle
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, 10], [-20, 20], [-5, 20], [-5, 10], [-20, 10]]
|
||||
])
|
||||
});
|
||||
@@ -243,7 +243,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with 1 hole
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[0, 10], [0, 20], [15, 20], [15, 10], [0, 10]]
|
||||
])
|
||||
});
|
||||
@@ -255,7 +255,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
// rectangle with 2 holes
|
||||
feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, -20], [-20, 5], [15, 5], [15, -20], [-20, -20]]
|
||||
])
|
||||
});
|
||||
@@ -317,7 +317,7 @@ describe('ol.rendering.style.Polygon', function() {
|
||||
|
||||
function createFeatures() {
|
||||
var feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_Polygon_([
|
||||
geometry: new Polygon([
|
||||
[[-20, -20], [-20, 20], [18, 20], [-20, -20]]
|
||||
])
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import LineString from '../../../../src/ol/geom/LineString.js';
|
||||
import MultiLineString from '../../../../src/ol/geom/MultiLineString.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_Map_ from '../../../../src/ol/Map.js';
|
||||
import _ol_View_ from '../../../../src/ol/View.js';
|
||||
import _ol_layer_Vector_ from '../../../../src/ol/layer/Vector.js';
|
||||
@@ -287,7 +287,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
|
||||
it('renders text along a Polygon', function(done) {
|
||||
createMap('canvas');
|
||||
var geom = new _ol_geom_Polygon_(null);
|
||||
var geom = new Polygon(null);
|
||||
geom.setFlatCoordinates('XY', polygon, [polygon.length]);
|
||||
var feature = new _ol_Feature_(geom);
|
||||
feature.setStyle(new _ol_style_Style_({
|
||||
@@ -305,7 +305,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
|
||||
it('renders text along a MultiPolygon', function(done) {
|
||||
createMap('canvas');
|
||||
var geom = new _ol_geom_Polygon_(null);
|
||||
var geom = new Polygon(null);
|
||||
geom.setFlatCoordinates('XY', polygon, [polygon.length]);
|
||||
var multiPolygon = new _ol_geom_MultiPolygon_(null);
|
||||
multiPolygon.appendPolygon(geom);
|
||||
|
||||
Reference in New Issue
Block a user