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

@@ -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({