Rename _ol_style_Fill_ to Fill

This commit is contained in:
Tim Schaub
2018-01-11 13:23:27 -07:00
parent 4f4c90fc20
commit dc6ae2293d
65 changed files with 268 additions and 268 deletions

View File

@@ -8,7 +8,7 @@ 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 _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
@@ -281,7 +281,7 @@ describe('ol.rendering.layer.Tile', function() {
e.vectorContext.setImageStyle(new _ol_style_Circle_({
radius: 5,
snapToPixel: false,
fill: new _ol_style_Fill_({color: 'yellow'}),
fill: new Fill({color: 'yellow'}),
stroke: new _ol_style_Stroke_({color: 'red', width: 1})
}));
e.vectorContext.drawPoint(new Point(

View File

@@ -9,7 +9,7 @@ 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 _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
@@ -255,7 +255,7 @@ describe('ol.rendering.layer.Vector', function() {
renderMode: 'image',
source: source,
style: new Style({
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgba(255,0,0,0.5)'
}),
stroke: new _ol_style_Stroke_({
@@ -355,7 +355,7 @@ describe('ol.rendering.layer.Vector', function() {
color: alternateColor(),
width: 1.25
}),
fill: new _ol_style_Fill_({
fill: new Fill({
color: alternateColor()
})
});
@@ -406,7 +406,7 @@ describe('ol.rendering.layer.Vector', function() {
color: alternateColor(),
width: 1.25
}),
fill: new _ol_style_Fill_({
fill: new Fill({
color: alternateColor()
})
});
@@ -471,7 +471,7 @@ describe('ol.rendering.layer.Vector', function() {
features: [feature]
}),
style: new Style({
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'blue'
})
})
@@ -539,7 +539,7 @@ describe('ol.rendering.layer.Vector', function() {
color: [0, 0, 0, 1],
width: 2
}),
fill: new _ol_style_Fill_({
fill: new Fill({
color: [255, 0, 0, 1]
})
}));
@@ -551,7 +551,7 @@ describe('ol.rendering.layer.Vector', function() {
it('renders partially out-of-view polygons with a fill', function(done) {
layer.setStyle(new Style({
fill: new _ol_style_Fill_({
fill: new Fill({
color: [0, 0, 0, 1]
})
}));

View File

@@ -9,7 +9,7 @@ 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 _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
@@ -107,7 +107,7 @@ describe('ol.rendering.layer.VectorTile', function() {
style: new Style({
image: new _ol_style_Circle_({
radius: 10,
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'red'
})
})
@@ -146,7 +146,7 @@ describe('ol.rendering.layer.VectorTile', function() {
return new Style({
image: new _ol_style_Circle_({
radius: 7,
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'red'
})
}),

View File

@@ -5,7 +5,7 @@ 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 _ol_style_Fill_ from '../../../src/ol/style/Fill.js';
import Fill from '../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../src/ol/style/Stroke.js';
import Style from '../../../src/ol/style/Style.js';
@@ -35,7 +35,7 @@ describe('ol.render', function() {
var style = new Style({
image: new _ol_style_Circle_({
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'green'
}),
radius: 10
@@ -136,7 +136,7 @@ describe('ol.render', function() {
color: 'blue',
width: 8
}),
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgba(0,0,255,0.5)'
})
});

View File

@@ -6,7 +6,7 @@ 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 _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -51,7 +51,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 2,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#91E339'
})
})
@@ -64,7 +64,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 4,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#5447E6'
})
})
@@ -77,7 +77,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 6,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#92A8A6'
})
})
@@ -90,7 +90,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 2,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#91E339'
}),
stroke: new _ol_style_Stroke_({
@@ -107,7 +107,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 4,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#5447E6'
}),
stroke: new _ol_style_Stroke_({
@@ -124,7 +124,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 6,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#92A8A6'
}),
stroke: new _ol_style_Stroke_({
@@ -155,7 +155,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 4,
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgba(0, 0, 255, 0.3)'
}),
stroke: new _ol_style_Stroke_({
@@ -172,7 +172,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 6,
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgba(235, 45, 70, 0.6)'
}),
stroke: new _ol_style_Stroke_({

View File

@@ -4,7 +4,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_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -44,7 +44,7 @@ describe('ol.rendering.style.Polygon', function() {
describe('different types', function() {
function createFeatures() {
var fill = new _ol_style_Fill_({color: 'red'});
var fill = new Fill({color: 'red'});
var feature;
// rectangle
@@ -179,7 +179,7 @@ describe('ol.rendering.style.Polygon', function() {
])
});
feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#E31E10'}),
fill: new Fill({color: '#E31E10'}),
zIndex: 2
}));
vectorSource.addFeature(feature);
@@ -191,7 +191,7 @@ describe('ol.rendering.style.Polygon', function() {
])
});
feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#1A5E42'}),
fill: new Fill({color: '#1A5E42'}),
zIndex: 3
}));
vectorSource.addFeature(feature);
@@ -203,7 +203,7 @@ describe('ol.rendering.style.Polygon', function() {
])
});
feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#DEDE21'}),
fill: new Fill({color: '#DEDE21'}),
zIndex: 1
}));
vectorSource.addFeature(feature);
@@ -236,7 +236,7 @@ describe('ol.rendering.style.Polygon', function() {
])
});
feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: '#9696EB'}),
fill: new Fill({color: '#9696EB'}),
stroke: new _ol_style_Stroke_({color: '#9696EB', width: 1})
}));
vectorSource.addFeature(feature);
@@ -248,7 +248,7 @@ describe('ol.rendering.style.Polygon', function() {
])
});
feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: 'rgba(255, 0, 0, 0.1)'}),
fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}),
stroke: new _ol_style_Stroke_({color: '#DE213A', width: 3})
}));
vectorSource.addFeature(feature);
@@ -260,7 +260,7 @@ describe('ol.rendering.style.Polygon', function() {
])
});
feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: 'rgba(18, 204, 105, 0.3)'}),
fill: new Fill({color: 'rgba(18, 204, 105, 0.3)'}),
stroke: new _ol_style_Stroke_({color: '#032E17', width: 2})
}));
vectorSource.addFeature(feature);
@@ -322,7 +322,7 @@ describe('ol.rendering.style.Polygon', function() {
])
});
feature.setStyle(new Style({
fill: new _ol_style_Fill_({color: createPattern()}),
fill: new Fill({color: createPattern()}),
stroke: new _ol_style_Stroke_({color: createRainbowGradient(), width: 3})
}));
vectorSource.addFeature(feature);

View File

@@ -4,7 +4,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_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js';
import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -109,7 +109,7 @@ describe('ol.rendering.style.RegularShape', function() {
describe('#render', function() {
var stroke = new _ol_style_Stroke_({width: 2});
var fill = new _ol_style_Fill_({color: 'red'});
var fill = new Fill({color: 'red'});
it('tests the canvas renderer', function(done) {
createMap('canvas');
@@ -144,7 +144,7 @@ describe('ol.rendering.style.RegularShape', function() {
describe('uses the default fill and stroke color', function() {
var stroke = new _ol_style_Stroke_();
var fill = new _ol_style_Fill_();
var fill = new Fill();
it('tests the canvas renderer', function(done) {
createMap('canvas');

View File

@@ -9,7 +9,7 @@ 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_Text_ from '../../../../src/ol/style/Text.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -68,7 +68,7 @@ describe('ol.rendering.style.Text', function() {
text: new _ol_style_Text_({
scale: scale,
text: 'hello',
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'red',
font: '12px sans-serif'
}),
@@ -333,17 +333,17 @@ describe('ol.rendering.style.Text', function() {
createMap('canvas');
createFeatures();
var features = vectorSource.getFeatures();
features[0].getStyle().getText().setBackgroundFill(new _ol_style_Fill_({
features[0].getStyle().getText().setBackgroundFill(new Fill({
color: 'red'
}));
features[1].getStyle().getText().setBackgroundFill(new _ol_style_Fill_({
features[1].getStyle().getText().setBackgroundFill(new Fill({
color: 'red'
}));
features[1].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({
color: 'blue',
width: 3
}));
features[2].getStyle().getText().setBackgroundFill(new _ol_style_Fill_({
features[2].getStyle().getText().setBackgroundFill(new Fill({
color: 'red'
}));
features[2].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({

View File

@@ -14,7 +14,7 @@ import {addProjection, addCoordinateTransforms, transform, get as getProjection}
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 _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js';
import IconAnchorUnits from '../../../../src/ol/style/IconAnchorUnits.js';
import IconOrigin from '../../../../src/ol/style/IconOrigin.js';
@@ -1947,7 +1947,7 @@ describe('ol.format.KML', function() {
expect(textStyle).to.be.an(_ol_style_Text_);
expect(textStyle.getScale()).to.be(0.25);
var textFillStyle = textStyle.getFill();
expect(textFillStyle).to.be.an(_ol_style_Fill_);
expect(textFillStyle).to.be.an(Fill);
expect(textFillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getZIndex()).to.be(undefined);
});
@@ -2008,7 +2008,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0];
expect(style).to.be.an(Style);
var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_);
expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_);
expect(style.getStroke()).to.be(KML.DEFAULT_STROKE_STYLE_);
@@ -2045,7 +2045,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0];
expect(style).to.be.an(Style);
var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_);
expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_);
var strokeStyle = style.getStroke();
@@ -2121,7 +2121,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0];
expect(style).to.be.an(Style);
var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_);
expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
expect(style.getImage()).to.be(KML.DEFAULT_IMAGE_STYLE_);
expect(style.getStroke()).to.be(null);
@@ -2337,7 +2337,7 @@ describe('ol.format.KML', function() {
var style = new Style({
image: new _ol_style_Circle_({
radius: 4,
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgb(12, 34, 223)'
})
})
@@ -2364,7 +2364,7 @@ describe('ol.format.KML', function() {
text: new _ol_style_Text_({
scale: 0.5,
text: 'foo',
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgb(12, 34, 223)'
})
})
@@ -2421,7 +2421,7 @@ describe('ol.format.KML', function() {
it('can write an feature\'s fill style', function() {
var style = new Style({
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgba(12, 34, 223, 0.7)'
})
});
@@ -2447,7 +2447,7 @@ describe('ol.format.KML', function() {
it('can write multiple features with Style', function() {
var style = new Style({
fill: new _ol_style_Fill_({
fill: new Fill({
color: 'rgba(12, 34, 223, 0.7)'
})
});
@@ -2724,7 +2724,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0];
expect(style).to.be.an(Style);
var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_);
expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
});
@@ -2756,7 +2756,7 @@ describe('ol.format.KML', function() {
var style = styleArray[0];
expect(style).to.be.an(Style);
var fillStyle = style.getFill();
expect(fillStyle).to.be.an(_ol_style_Fill_);
expect(fillStyle).to.be.an(Fill);
expect(fillStyle.getColor()).to.eql([0x78, 0x56, 0x34, 0x12 / 255]);
});

View File

@@ -9,7 +9,7 @@ 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 _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js';
import _ol_style_Text_ from '../../../../../src/ol/style/Text.js';
@@ -42,7 +42,7 @@ describe('ol.render.canvas.Immediate', function() {
sinon.spy(context, 'setFillStrokeStyle');
sinon.spy(context, 'setImageStyle');
sinon.spy(context, 'setTextStyle');
var fill = new _ol_style_Fill_({});
var fill = new Fill({});
var stroke = new _ol_style_Stroke_({});
var text = new _ol_style_Text_({});
var image = new _ol_style_Circle_({});

View File

@@ -4,7 +4,7 @@ import Circle from '../../../../../src/ol/geom/Circle.js';
import _ol_render_webgl_CircleReplay_ from '../../../../../src/ol/render/webgl/CircleReplay.js';
import _ol_render_webgl_circlereplay_defaultshader_ from '../../../../../src/ol/render/webgl/circlereplay/defaultshader.js';
import _ol_render_webgl_circlereplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/circlereplay/defaultshader/Locations.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
describe('ol.render.webgl.CircleReplay', function() {
@@ -14,7 +14,7 @@ describe('ol.render.webgl.CircleReplay', function() {
color: [0, 255, 0, 0.4]
});
var fillStyle = new _ol_style_Fill_({
var fillStyle = new Fill({
color: [255, 0, 0, 1]
});

View File

@@ -13,7 +13,7 @@ import _ol_render_webgl_Immediate_ from '../../../../../src/ol/render/webgl/Imme
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 _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js';
@@ -23,7 +23,7 @@ describe('ol.render.webgl.Immediate', 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_(),
fill: new _ol_style_Fill_(),
fill: new Fill(),
stroke: new _ol_style_Stroke_()
});
circle = new Circle([0, 0], 5);

View File

@@ -7,13 +7,13 @@ import _ol_render_webgl_polygonreplay_defaultshader_ from '../../../../../src/ol
import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../../../../../src/ol/render/webgl/polygonreplay/defaultshader/Locations.js';
import LinkedList from '../../../../../src/ol/structs/LinkedList.js';
import RBush from '../../../../../src/ol/structs/RBush.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
describe('ol.render.webgl.PolygonReplay', function() {
var replay;
var fillStyle = new _ol_style_Fill_({
var fillStyle = new Fill({
color: [0, 0, 255, 0.5]
});
var strokeStyle = new _ol_style_Stroke_({
@@ -435,7 +435,7 @@ describe('ol.render.webgl.PolygonReplay', function() {
});
it('draws the elements in batches if there are multiple fill styles', function() {
var fillStyle2 = new _ol_style_Fill_({
var fillStyle2 = new Fill({
color: [0, 255, 0, 1]
});
replay.setFillStrokeStyle(fillStyle, strokeStyle);

View File

@@ -1,7 +1,7 @@
import {createCanvasContext2D} from '../../../../../src/ol/dom.js';
import Point from '../../../../../src/ol/geom/Point.js';
import _ol_render_webgl_TextReplay_ from '../../../../../src/ol/render/webgl/TextReplay.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import _ol_style_Text_ from '../../../../../src/ol/style/Text.js';
@@ -37,7 +37,7 @@ describe('ol.render.webgl.TextReplay', function() {
beforeEach(function() {
textStyle1 = createTextStyle(
new _ol_style_Fill_({
new Fill({
color: [0, 0, 0, 1]
}),
new _ol_style_Stroke_({
@@ -51,7 +51,7 @@ describe('ol.render.webgl.TextReplay', function() {
}),
'someText');
textStyle2 = createTextStyle(
new _ol_style_Fill_({
new Fill({
color: [255, 255, 255, 1]
}),
new _ol_style_Stroke_({
@@ -62,7 +62,7 @@ describe('ol.render.webgl.TextReplay', function() {
);
textStyle3 = createTextStyle(null, null, 'someText');
textStyle4 = createTextStyle(
new _ol_style_Fill_({
new Fill({
color: [0, 0, 0, 1]
}),
new _ol_style_Stroke_({
@@ -115,7 +115,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#drawText', function() {
beforeEach(function() {
var textStyle = createTextStyle(
new _ol_style_Fill_({
new Fill({
color: [0, 0, 0, 1]
}),
null, 'someText');
@@ -171,7 +171,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#addCharToAtlas_', function() {
beforeEach(function() {
var textStyle = createTextStyle(
new _ol_style_Fill_({
new Fill({
color: [0, 0, 0, 1]
}),
null, 'someText');
@@ -209,7 +209,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#getTextSize_', function() {
beforeEach(function() {
var textStyle = createTextStyle(
new _ol_style_Fill_({
new Fill({
color: [0, 0, 0, 1]
}),
null, 'someText');
@@ -261,7 +261,7 @@ describe('ol.render.webgl.TextReplay', function() {
describe('#getAtlas_', function() {
beforeEach(function() {
var textStyle = createTextStyle(
new _ol_style_Fill_({
new Fill({
color: [0, 0, 0, 1]
}),
null, 'someText');

View File

@@ -12,7 +12,7 @@ import _ol_render_canvas_PolygonReplay_ from '../../../../../src/ol/render/canva
import _ol_render_canvas_Replay_ from '../../../../../src/ol/render/canvas/Replay.js';
import _ol_render_canvas_ReplayGroup_ from '../../../../../src/ol/render/canvas/ReplayGroup.js';
import _ol_renderer_vector_ from '../../../../../src/ol/renderer/vector.js';
import _ol_style_Fill_ from '../../../../../src/ol/style/Fill.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js';
import _ol_transform_ from '../../../../../src/ol/transform.js';
@@ -38,17 +38,17 @@ describe('ol.render.canvas.ReplayGroup', function() {
feature3 = new Feature(new Polygon(
[[[-90, -45], [-90, 45], [90, 45], [90, -45], [-90, -45]]]));
fill0 = new Style({
fill: new _ol_style_Fill_({color: 'black'})
fill: new Fill({color: 'black'})
});
fill1 = new Style({
fill: new _ol_style_Fill_({color: 'red'})
fill: new Fill({color: 'red'})
});
style1 = new Style({
fill: new _ol_style_Fill_({color: 'black'}),
fill: new Fill({color: 'black'}),
stroke: new _ol_style_Stroke_({color: 'white', width: 1})
});
style2 = new Style({
fill: new _ol_style_Fill_({color: 'white'}),
fill: new Fill({color: 'white'}),
stroke: new _ol_style_Stroke_({color: 'black', width: 1, lineDash: [3, 6],
lineDashOffset: 2})
});

View File

@@ -8,7 +8,7 @@ import MultiPoint from '../../../../src/ol/geom/MultiPoint.js';
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
import _ol_render_canvas_ReplayGroup_ from '../../../../src/ol/render/canvas/ReplayGroup.js';
import _ol_renderer_vector_ from '../../../../src/ol/renderer/vector.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Icon_ from '../../../../src/ol/style/Icon.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js';
@@ -29,7 +29,7 @@ describe('ol.renderer.vector', function() {
});
style = new Style({
image: iconStyle,
fill: new _ol_style_Fill_({}),
fill: new Fill({}),
stroke: new _ol_style_Stroke_({})
});
squaredTolerance = 1;

View File

@@ -1,6 +1,6 @@
import AtlasManager from '../../../../src/ol/style/AtlasManager.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -24,7 +24,7 @@ describe('ol.style.Circle', function() {
it('creates a canvas if no atlas is used (fill-style)', function() {
var style = new _ol_style_Circle_({
radius: 10,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#FFFF00'
})
});
@@ -58,7 +58,7 @@ describe('ol.style.Circle', function() {
var style = new _ol_style_Circle_({
radius: 10,
atlasManager: atlasManager,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#FFFF00'
})
});
@@ -85,7 +85,7 @@ describe('ol.style.Circle', function() {
it('copies all values', function() {
var original = new _ol_style_Circle_({
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -107,7 +107,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_({
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -155,7 +155,7 @@ describe('ol.style.Circle', function() {
it('calculates not the same hash code (color)', function() {
var style1 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
})
});
@@ -171,7 +171,7 @@ describe('ol.style.Circle', function() {
it('calculates the same hash code (everything set)', function() {
var style1 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -185,7 +185,7 @@ describe('ol.style.Circle', function() {
});
var style2 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -203,7 +203,7 @@ describe('ol.style.Circle', function() {
it('calculates not the same hash code (stroke width differs)', function() {
var style1 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -217,7 +217,7 @@ describe('ol.style.Circle', function() {
});
var style2 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -235,7 +235,7 @@ describe('ol.style.Circle', function() {
it('invalidates a cached checksum if values change (fill)', function() {
var style1 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -244,7 +244,7 @@ describe('ol.style.Circle', function() {
});
var style2 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -260,7 +260,7 @@ describe('ol.style.Circle', function() {
it('invalidates a cached checksum if values change (stroke)', function() {
var style1 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -269,7 +269,7 @@ describe('ol.style.Circle', function() {
});
var style2 = new _ol_style_Circle_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -288,7 +288,7 @@ describe('ol.style.Circle', function() {
it('changes the circle radius', function() {
var style = new _ol_style_Circle_({
radius: 10,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#FFFF00'
})
});

View File

@@ -1,18 +1,18 @@
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
describe('ol.style.Fill', function() {
describe('#clone', function() {
it('creates a new ol.style.Fill', function() {
var original = new _ol_style_Fill_();
var original = new Fill();
var clone = original.clone();
expect(clone).to.be.an(_ol_style_Fill_);
expect(clone).to.be.an(Fill);
expect(clone).to.not.be(original);
});
it('copies all values', function() {
var original = new _ol_style_Fill_({
var original = new Fill({
color: '#319FD3'
});
var clone = original.clone();
@@ -20,7 +20,7 @@ describe('ol.style.Fill', function() {
});
it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_Fill_({
var original = new Fill({
color: [63, 255, 127, 0.7]
});
var clone = original.clone();

View File

@@ -1,6 +1,6 @@
import AtlasManager from '../../../../src/ol/style/AtlasManager.js';
import _ol_style_RegularShape_ from '../../../../src/ol/style/RegularShape.js';
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
@@ -50,7 +50,7 @@ describe('ol.style.RegularShape', function() {
it('creates a canvas if no atlas is used (fill-style)', function() {
var style = new _ol_style_RegularShape_({
radius: 10,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#FFFF00'
})
});
@@ -85,7 +85,7 @@ describe('ol.style.RegularShape', function() {
var style = new _ol_style_RegularShape_({
radius: 10,
atlasManager: atlasManager,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#FFFF00'
})
});
@@ -114,7 +114,7 @@ describe('ol.style.RegularShape', function() {
it('copies all values', function() {
var original = new _ol_style_RegularShape_({
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
points: 5,
@@ -146,7 +146,7 @@ describe('ol.style.RegularShape', function() {
it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_RegularShape_({
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -204,7 +204,7 @@ describe('ol.style.RegularShape', function() {
it('calculates not the same hash code (color)', function() {
var style1 = new _ol_style_RegularShape_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
})
});
@@ -223,7 +223,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3,
angle: 1.41,
points: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -240,7 +240,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3,
angle: 1.41,
points: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -261,7 +261,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3,
angle: 1.41,
points: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -278,7 +278,7 @@ describe('ol.style.RegularShape', function() {
radius2: 3,
angle: 1.41,
points: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -296,7 +296,7 @@ describe('ol.style.RegularShape', function() {
it('invalidates a cached checksum if values change (fill)', function() {
var style1 = new _ol_style_RegularShape_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -305,7 +305,7 @@ describe('ol.style.RegularShape', function() {
});
var style2 = new _ol_style_RegularShape_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -321,7 +321,7 @@ describe('ol.style.RegularShape', function() {
it('invalidates a cached checksum if values change (stroke)', function() {
var style1 = new _ol_style_RegularShape_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
@@ -330,7 +330,7 @@ describe('ol.style.RegularShape', function() {
});
var style2 = new _ol_style_RegularShape_({
radius: 5,
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({

View File

@@ -1,7 +1,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 _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
@@ -9,7 +9,7 @@ import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
describe('ol.style.Style', function() {
var testFill = new _ol_style_Fill_({
var testFill = new Fill({
color: 'rgba(255, 255, 255, 0.6)'
});
@@ -20,7 +20,7 @@ describe('ol.style.Style', function() {
var testText = new _ol_style_Text_({
font: '12px Calibri,sans-serif',
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#000'
}),
stroke: new _ol_style_Stroke_({
@@ -45,7 +45,7 @@ describe('ol.style.Style', function() {
it('copies all values', function() {
var original = new Style({
geometry: new Point([0, 0, 0]),
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
image: new _ol_style_Circle_({
@@ -71,7 +71,7 @@ describe('ol.style.Style', function() {
it('the clone does not reference the same objects as the original', function() {
var original = new Style({
geometry: new Point([0, 0, 0]),
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
image: new _ol_style_Circle_({

View File

@@ -1,4 +1,4 @@
import _ol_style_Fill_ from '../../../../src/ol/style/Fill.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
@@ -14,7 +14,7 @@ describe('ol.style.Text', function() {
it('uses a provided fill style if one passed', function() {
var style = new _ol_style_Text_({
fill: new _ol_style_Fill_({color: '#123456'})
fill: new Fill({color: '#123456'})
});
expect(style.getFill().getColor()).to.be('#123456');
});
@@ -47,13 +47,13 @@ describe('ol.style.Text', function() {
text: 'test',
textAlign: 'center',
textBaseline: 'top',
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({
color: '#319FD3'
}),
backgroundFill: new _ol_style_Fill_({
backgroundFill: new Fill({
color: 'white'
}),
backgroundStroke: new _ol_style_Stroke_({
@@ -78,7 +78,7 @@ describe('ol.style.Text', function() {
it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_Text_({
fill: new _ol_style_Fill_({
fill: new Fill({
color: '#319FD3'
}),
stroke: new _ol_style_Stroke_({