Rename _ol_style_Circle_ to CircleStyle

This commit is contained in:
Tim Schaub
2018-01-11 13:27:54 -07:00
parent 16c8d2c246
commit 14ddcf843d
37 changed files with 133 additions and 133 deletions

View File

@@ -7,7 +7,7 @@ import _ol_obj_ from '../../../../src/ol/obj.js';
import {transform} from '../../../../src/ol/proj.js';
import TileImage from '../../../../src/ol/source/TileImage.js';
import XYZ from '../../../../src/ol/source/XYZ.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
@@ -278,7 +278,7 @@ describe('ol.rendering.layer.Tile', function() {
});
onAddLayer = function(evt) {
evt.element.on('render', function(e) {
e.vectorContext.setImageStyle(new _ol_style_Circle_({
e.vectorContext.setImageStyle(new CircleStyle({
radius: 5,
snapToPixel: false,
fill: new Fill({color: 'yellow'}),

View File

@@ -8,7 +8,7 @@ import Point from '../../../../src/ol/geom/Point.js';
import Polygon from '../../../../src/ol/geom/Polygon.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js';
@@ -724,7 +724,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setDeclutter(true);
layer.setStyle(function(feature) {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 15,
stroke: new Stroke({
color: 'blue'
@@ -764,7 +764,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setDeclutter(true);
layer.setStyle(function(feature) {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 15,
stroke: new Stroke({
color: 'blue'
@@ -806,7 +806,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setStyle(function(feature) {
return new Style({
zIndex: feature.get('zIndex'),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 15,
stroke: new Stroke({
color: 'blue'
@@ -844,7 +844,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setDeclutter(true);
layer.setStyle(function(feature) {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
stroke: new Stroke({
color: 'blue'
@@ -874,7 +874,7 @@ describe('ol.rendering.layer.Vector', function() {
var point = new Feature(new Point(center));
point.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 8,
stroke: new Stroke({
color: 'blue'
@@ -917,7 +917,7 @@ describe('ol.rendering.layer.Vector', function() {
var point = new Feature(new Point(center));
point.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 8,
stroke: new Stroke({
color: 'blue'
@@ -961,7 +961,7 @@ describe('ol.rendering.layer.Vector', function() {
var point = new Feature(new Point(center));
point.setStyle(new Style({
zIndex: 2,
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 8,
stroke: new Stroke({
color: 'blue'

View File

@@ -8,7 +8,7 @@ import VectorTileLayer from '../../../../src/ol/layer/VectorTile.js';
import _ol_obj_ from '../../../../src/ol/obj.js';
import VectorSource from '../../../../src/ol/source/Vector.js';
import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import Text from '../../../../src/ol/style/Text.js';
@@ -105,7 +105,7 @@ describe('ol.rendering.layer.VectorTile', function() {
zIndex: 1,
source: vectorSource,
style: new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
fill: new Fill({
color: 'red'
@@ -144,7 +144,7 @@ describe('ol.rendering.layer.VectorTile', function() {
var geom = feature.getGeometry();
if (geom.getType() == 'Point') {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 7,
fill: new Fill({
color: 'red'

View File

@@ -4,7 +4,7 @@ import Polygon from '../../../src/ol/geom/Polygon.js';
import _ol_render_ from '../../../src/ol/render.js';
import VectorContext from '../../../src/ol/render/VectorContext.js';
import CanvasImmediateRenderer from '../../../src/ol/render/canvas/Immediate.js';
import _ol_style_Circle_ from '../../../src/ol/style/Circle.js';
import CircleStyle from '../../../src/ol/style/Circle.js';
import Fill from '../../../src/ol/style/Fill.js';
import Stroke from '../../../src/ol/style/Stroke.js';
import Style from '../../../src/ol/style/Style.js';
@@ -34,7 +34,7 @@ describe('ol.render', function() {
});
var style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'green'
}),

View File

@@ -5,7 +5,7 @@ import Map from '../../../../src/ol/Map.js';
import View from '../../../../src/ol/View.js';
import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
@@ -49,7 +49,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-20, 18]]) : new Point([-20, 18])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
fill: new Fill({
color: '#91E339'
@@ -62,7 +62,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-10, 18]]) : new Point([-10, 18])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: '#5447E6'
@@ -75,7 +75,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[4, 18]]) : new Point([4, 18])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 6,
fill: new Fill({
color: '#92A8A6'
@@ -88,7 +88,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-20, 3]]) : new Point([-20, 3])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
fill: new Fill({
color: '#91E339'
@@ -105,7 +105,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-10, 3]]) : new Point([-10, 3])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: '#5447E6'
@@ -122,7 +122,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[4, 3]]) : new Point([4, 3])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 6,
fill: new Fill({
color: '#92A8A6'
@@ -139,7 +139,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-20, -15]]) : new Point([-20, -15])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
stroke: new Stroke({
color: '#256308',
@@ -153,7 +153,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-10, -15]]) : new Point([-10, -15])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: 'rgba(0, 0, 255, 0.3)'
@@ -170,7 +170,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[4, -15]]) : new Point([4, -15])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 6,
fill: new Fill({
color: 'rgba(235, 45, 70, 0.6)'

View File

@@ -13,7 +13,7 @@ import Polygon from '../../../../src/ol/geom/Polygon.js';
import {addProjection, addCoordinateTransforms, transform, get as getProjection} from '../../../../src/ol/proj.js';
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
import {remove as removeTransform} from '../../../../src/ol/proj/transforms.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Icon from '../../../../src/ol/style/Icon.js';
import IconAnchorUnits from '../../../../src/ol/style/IconAnchorUnits.js';
@@ -2335,7 +2335,7 @@ describe('ol.format.KML', function() {
it('skips image styles that are not icon styles', function() {
var style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: 'rgb(12, 34, 223)'

View File

@@ -8,7 +8,7 @@ import Point from '../../../../../src/ol/geom/Point.js';
import Polygon from '../../../../../src/ol/geom/Polygon.js';
import VectorContext from '../../../../../src/ol/render/VectorContext.js';
import CanvasImmediateRenderer from '../../../../../src/ol/render/canvas/Immediate.js';
import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../../src/ol/style/Circle.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import Stroke from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js';
@@ -45,7 +45,7 @@ describe('ol.render.canvas.Immediate', function() {
var fill = new Fill({});
var stroke = new Stroke({});
var text = new Text({});
var image = new _ol_style_Circle_({});
var image = new CircleStyle({});
var style = new Style({
fill: fill,
stroke: stroke,

View File

@@ -12,7 +12,7 @@ import _ol_render_webgl_ImageReplay_ from '../../../../../src/ol/render/webgl/Im
import _ol_render_webgl_Immediate_ from '../../../../../src/ol/render/webgl/Immediate.js';
import _ol_render_webgl_LineStringReplay_ from '../../../../../src/ol/render/webgl/LineStringReplay.js';
import _ol_render_webgl_PolygonReplay_ from '../../../../../src/ol/render/webgl/PolygonReplay.js';
import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../../src/ol/style/Circle.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import Stroke from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js';
@@ -22,7 +22,7 @@ describe('ol.render.webgl.Immediate', function() {
beforeEach(function() {
context = new _ol_render_webgl_Immediate_({}, [0, 0], 0, 0, [0, 0], [-180, -90, 180, 90], 1);
style = new Style({
image: new _ol_style_Circle_(),
image: new CircleStyle(),
fill: new Fill(),
stroke: new Stroke()
});

View File

@@ -1,5 +1,5 @@
import AtlasManager from '../../../../src/ol/style/AtlasManager.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
@@ -9,7 +9,7 @@ describe('ol.style.Circle', function() {
describe('#constructor', function() {
it('creates a canvas if no atlas is used (no fill-style)', function() {
var style = new _ol_style_Circle_({radius: 10});
var style = new CircleStyle({radius: 10});
expect(style.getImage()).to.be.an(HTMLCanvasElement);
expect(style.getSize()).to.eql([21, 21]);
expect(style.getImageSize()).to.eql([21, 21]);
@@ -22,7 +22,7 @@ describe('ol.style.Circle', function() {
});
it('creates a canvas if no atlas is used (fill-style)', function() {
var style = new _ol_style_Circle_({
var style = new CircleStyle({
radius: 10,
fill: new Fill({
color: '#FFFF00'
@@ -41,7 +41,7 @@ describe('ol.style.Circle', function() {
it('adds itself to an atlas manager (no fill-style)', function() {
var atlasManager = new AtlasManager({initialSize: 512});
var style = new _ol_style_Circle_({radius: 10, atlasManager: atlasManager});
var style = new CircleStyle({radius: 10, atlasManager: atlasManager});
expect(style.getImage()).to.be.an(HTMLCanvasElement);
expect(style.getSize()).to.eql([21, 21]);
expect(style.getImageSize()).to.eql([512, 512]);
@@ -55,7 +55,7 @@ describe('ol.style.Circle', function() {
it('adds itself to an atlas manager (fill-style)', function() {
var atlasManager = new AtlasManager({initialSize: 512});
var style = new _ol_style_Circle_({
var style = new CircleStyle({
radius: 10,
atlasManager: atlasManager,
fill: new Fill({
@@ -77,14 +77,14 @@ describe('ol.style.Circle', function() {
describe('#clone', function() {
it('creates a new ol.style.Circle', function() {
var original = new _ol_style_Circle_();
var original = new CircleStyle();
var clone = original.clone();
expect(clone).to.be.an(_ol_style_Circle_);
expect(clone).to.be.an(CircleStyle);
expect(clone).to.not.be(original);
});
it('copies all values', function() {
var original = new _ol_style_Circle_({
var original = new CircleStyle({
fill: new Fill({
color: '#319FD3'
}),
@@ -106,7 +106,7 @@ describe('ol.style.Circle', function() {
});
it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_Circle_({
var original = new CircleStyle({
fill: new Fill({
color: '#319FD3'
}),
@@ -129,37 +129,37 @@ describe('ol.style.Circle', function() {
describe('#getChecksum', function() {
it('calculates the same hash code for default options', function() {
var style1 = new _ol_style_Circle_();
var style2 = new _ol_style_Circle_();
var style1 = new CircleStyle();
var style2 = new CircleStyle();
expect(style1.getChecksum()).to.eql(style2.getChecksum());
});
it('calculates not the same hash code (radius)', function() {
var style1 = new _ol_style_Circle_();
var style2 = new _ol_style_Circle_({
var style1 = new CircleStyle();
var style2 = new CircleStyle({
radius: 5
});
expect(style1.getChecksum()).to.not.eql(style2.getChecksum());
});
it('calculates the same hash code (radius)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5
});
expect(style1.getChecksum()).to.eql(style2.getChecksum());
});
it('calculates not the same hash code (color)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
stroke: new Stroke({
color: '#319FD3'
@@ -169,7 +169,7 @@ describe('ol.style.Circle', function() {
});
it('calculates the same hash code (everything set)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -183,7 +183,7 @@ describe('ol.style.Circle', function() {
width: 2
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -201,7 +201,7 @@ describe('ol.style.Circle', function() {
});
it('calculates not the same hash code (stroke width differs)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -215,7 +215,7 @@ describe('ol.style.Circle', function() {
width: 3
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -233,7 +233,7 @@ describe('ol.style.Circle', function() {
});
it('invalidates a cached checksum if values change (fill)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -242,7 +242,7 @@ describe('ol.style.Circle', function() {
color: '#319FD3'
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -258,7 +258,7 @@ describe('ol.style.Circle', function() {
});
it('invalidates a cached checksum if values change (stroke)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -267,7 +267,7 @@ describe('ol.style.Circle', function() {
color: '#319FD3'
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -286,7 +286,7 @@ describe('ol.style.Circle', function() {
describe('#setRadius', function() {
it('changes the circle radius', function() {
var style = new _ol_style_Circle_({
var style = new CircleStyle({
radius: 10,
fill: new Fill({
color: '#FFFF00'

View File

@@ -2,7 +2,7 @@ import Feature from '../../../../src/ol/Feature.js';
import Point from '../../../../src/ol/geom/Point.js';
import Style from '../../../../src/ol/style/Style.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import Text from '../../../../src/ol/style/Text.js';
@@ -29,7 +29,7 @@ describe('ol.style.Style', function() {
})
});
var testImage = new _ol_style_Circle_({
var testImage = new CircleStyle({
radius: 5
});
@@ -48,7 +48,7 @@ describe('ol.style.Style', function() {
fill: new Fill({
color: '#319FD3'
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5
}),
stroke: new Stroke({
@@ -74,7 +74,7 @@ describe('ol.style.Style', function() {
fill: new Fill({
color: '#319FD3'
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5
}),
stroke: new Stroke({