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
+26 -26
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'
+4 -4
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({