Rename _ol_style_Stroke_ to Stroke

This commit is contained in:
Tim Schaub
2018-01-11 13:24:13 -07:00
parent dc6ae2293d
commit f4484455aa
75 changed files with 333 additions and 333 deletions

View File

@@ -3,7 +3,7 @@ import View from '../../../../src/ol/View.js';
import MultiPolygon from '../../../../src/ol/geom/MultiPolygon.js';
import TileLayer from '../../../../src/ol/layer/Tile.js';
import XYZ from '../../../../src/ol/source/XYZ.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js';
@@ -70,7 +70,7 @@ describe('layer clipping', function() {
]).transform('EPSG:4326', 'EPSG:3857');
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
width: 2,
color: 'blue'
})

View File

@@ -9,7 +9,7 @@ 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 Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
@@ -282,7 +282,7 @@ describe('ol.rendering.layer.Tile', function() {
radius: 5,
snapToPixel: false,
fill: new Fill({color: 'yellow'}),
stroke: new _ol_style_Stroke_({color: 'red', width: 1})
stroke: new Stroke({color: 'red', width: 1})
}));
e.vectorContext.drawPoint(new Point(
transform([-123, 38], 'EPSG:4326', 'EPSG:3857')));

View File

@@ -10,7 +10,7 @@ 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 Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import 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';
@@ -81,7 +81,7 @@ describe('ol.rendering.layer.Vector', function() {
]));
smallLine.setStyle(new Style({
zIndex: -99,
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
stroke: new Stroke({width: 75, color: 'red'})
}));
source.addFeature(smallLine);
addPolygon(100);
@@ -107,7 +107,7 @@ describe('ol.rendering.layer.Vector', function() {
]));
smallLine.setStyle(new Style({
zIndex: -99,
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
stroke: new Stroke({width: 75, color: 'red'})
}));
source.addFeature(smallLine);
addPolygon(100);
@@ -134,10 +134,10 @@ describe('ol.rendering.layer.Vector', function() {
]));
smallLine.setStyle([
new Style({
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
stroke: new Stroke({width: 75, color: 'red'})
}),
new Style({
stroke: new _ol_style_Stroke_({width: 45, color: 'white'})
stroke: new Stroke({width: 45, color: 'white'})
})
]);
source.addFeature(smallLine);
@@ -147,10 +147,10 @@ describe('ol.rendering.layer.Vector', function() {
]));
smallLine2.setStyle([
new Style({
stroke: new _ol_style_Stroke_({width: 35, color: 'blue'})
stroke: new Stroke({width: 35, color: 'blue'})
}),
new Style({
stroke: new _ol_style_Stroke_({width: 15, color: 'green'})
stroke: new Stroke({width: 15, color: 'green'})
})
]);
source.addFeature(smallLine2);
@@ -173,10 +173,10 @@ describe('ol.rendering.layer.Vector', function() {
]));
smallLine.setStyle([
new Style({
stroke: new _ol_style_Stroke_({width: 75, color: 'red'})
stroke: new Stroke({width: 75, color: 'red'})
}),
new Style({
stroke: new _ol_style_Stroke_({width: 45, color: 'white'})
stroke: new Stroke({width: 45, color: 'white'})
})
]);
source.addFeature(smallLine);
@@ -186,10 +186,10 @@ describe('ol.rendering.layer.Vector', function() {
]));
smallLine2.setStyle([
new Style({
stroke: new _ol_style_Stroke_({width: 35, color: 'blue'})
stroke: new Stroke({width: 35, color: 'blue'})
}),
new Style({
stroke: new _ol_style_Stroke_({width: 15, color: 'green'})
stroke: new Stroke({width: 15, color: 'green'})
})
]);
source.addFeature(smallLine2);
@@ -213,7 +213,7 @@ describe('ol.rendering.layer.Vector', function() {
map.addLayer(new VectorLayer({
source: source,
style: new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
width: 2,
color: 'black'
})
@@ -234,7 +234,7 @@ describe('ol.rendering.layer.Vector', function() {
renderMode: 'image',
source: source,
style: new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
width: 2,
color: 'black'
})
@@ -258,7 +258,7 @@ describe('ol.rendering.layer.Vector', function() {
fill: new Fill({
color: 'rgba(255,0,0,0.5)'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
width: 2,
color: 'black'
})
@@ -286,7 +286,7 @@ describe('ol.rendering.layer.Vector', function() {
map.addLayer(new VectorLayer({
source: source,
style: new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#3399CC',
width: 1.25
})
@@ -310,7 +310,7 @@ describe('ol.rendering.layer.Vector', function() {
map.addLayer(new VectorLayer({
source: source,
style: new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#3399CC',
width: 1.25
})
@@ -351,7 +351,7 @@ describe('ol.rendering.layer.Vector', function() {
style: function(feature) {
alternateColor();
return new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: alternateColor(),
width: 1.25
}),
@@ -402,7 +402,7 @@ describe('ol.rendering.layer.Vector', function() {
style: function(feature) {
alternateColor();
return new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: alternateColor(),
width: 1.25
}),
@@ -535,7 +535,7 @@ describe('ol.rendering.layer.Vector', function() {
it('renders partially out-of-view polygons with a fill and stroke', function(done) {
layer.setStyle(new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: [0, 0, 0, 1],
width: 2
}),
@@ -563,7 +563,7 @@ describe('ol.rendering.layer.Vector', function() {
it('renders partially out-of-view polygons with a stroke', function(done) {
layer.setStyle(new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: [0, 0, 0, 1],
width: 2
})
@@ -726,7 +726,7 @@ describe('ol.rendering.layer.Vector', function() {
return new Style({
image: new _ol_style_Circle_({
radius: 15,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue'
})
})
@@ -766,7 +766,7 @@ describe('ol.rendering.layer.Vector', function() {
return new Style({
image: new _ol_style_Circle_({
radius: 15,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue'
})
})
@@ -808,7 +808,7 @@ describe('ol.rendering.layer.Vector', function() {
zIndex: feature.get('zIndex'),
image: new _ol_style_Circle_({
radius: 15,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue'
})
})
@@ -846,7 +846,7 @@ describe('ol.rendering.layer.Vector', function() {
return new Style({
image: new _ol_style_Circle_({
radius: 5,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue'
})
}),
@@ -876,7 +876,7 @@ describe('ol.rendering.layer.Vector', function() {
point.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 8,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue'
})
})
@@ -886,7 +886,7 @@ describe('ol.rendering.layer.Vector', function() {
[center[0] + 650, center[1] - 200]
]));
line.setStyle(new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#CCC',
width: 12
}),
@@ -919,7 +919,7 @@ describe('ol.rendering.layer.Vector', function() {
point.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 8,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue'
})
})
@@ -929,7 +929,7 @@ describe('ol.rendering.layer.Vector', function() {
[center[0] + 650, center[1] - 200]
]));
line.setStyle(new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#CCC',
width: 12
}),
@@ -963,7 +963,7 @@ describe('ol.rendering.layer.Vector', function() {
zIndex: 2,
image: new _ol_style_Circle_({
radius: 8,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue'
})
})
@@ -974,7 +974,7 @@ describe('ol.rendering.layer.Vector', function() {
]));
line.setStyle(new Style({
zIndex: 1,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#CCC',
width: 12
}),

View File

@@ -6,7 +6,7 @@ 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 Fill from '../../../src/ol/style/Fill.js';
import _ol_style_Stroke_ from '../../../src/ol/style/Stroke.js';
import Stroke from '../../../src/ol/style/Stroke.js';
import Style from '../../../src/ol/style/Style.js';
function getContext() {
@@ -58,7 +58,7 @@ describe('ol.render', function() {
});
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'red',
width: 14
})
@@ -82,7 +82,7 @@ describe('ol.render', function() {
});
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
lineCap: 'butt',
color: 'red',
width: 14
@@ -107,7 +107,7 @@ describe('ol.render', function() {
});
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
lineJoin: 'bevel',
color: 'red',
width: 14
@@ -132,7 +132,7 @@ describe('ol.render', function() {
});
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'blue',
width: 8
}),
@@ -161,7 +161,7 @@ describe('ol.render', function() {
});
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
lineDash: [10, 5]
})
});
@@ -186,7 +186,7 @@ describe('ol.render', function() {
});
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
lineDash: [10, 5],
lineDashOffset: 5
})

View File

@@ -8,7 +8,7 @@ import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.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';
import Stroke from '../../../../src/ol/style/Stroke.js';
describe('ol.rendering.style.Circle', function() {
@@ -93,7 +93,7 @@ describe('ol.rendering.style.Circle', function() {
fill: new Fill({
color: '#91E339'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#000000',
width: 1
})
@@ -110,7 +110,7 @@ describe('ol.rendering.style.Circle', function() {
fill: new Fill({
color: '#5447E6'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#000000',
width: 2
})
@@ -127,7 +127,7 @@ describe('ol.rendering.style.Circle', function() {
fill: new Fill({
color: '#92A8A6'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#000000',
width: 3
})
@@ -141,7 +141,7 @@ describe('ol.rendering.style.Circle', function() {
feature.setStyle(new Style({
image: new _ol_style_Circle_({
radius: 2,
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#256308',
width: 1
})
@@ -158,7 +158,7 @@ describe('ol.rendering.style.Circle', function() {
fill: new Fill({
color: 'rgba(0, 0, 255, 0.3)'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#256308',
width: 2
})
@@ -175,7 +175,7 @@ describe('ol.rendering.style.Circle', function() {
fill: new Fill({
color: 'rgba(235, 45, 70, 0.6)'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#256308',
width: 3
})

View File

@@ -5,7 +5,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 Style from '../../../../src/ol/style/Style.js';
import _ol_style_Stroke_ from '../../../../src/ol/style/Stroke.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
describe('ol.rendering.style.LineString', function() {
@@ -49,7 +49,7 @@ describe('ol.rendering.style.LineString', function() {
)
});
feature.setStyle(new Style({
stroke: new _ol_style_Stroke_({color: '#DE213A', width: 3})
stroke: new Stroke({color: '#DE213A', width: 3})
}));
vectorSource.addFeature(feature);
@@ -59,7 +59,7 @@ describe('ol.rendering.style.LineString', function() {
)
});
feature.setStyle(new Style({
stroke: new _ol_style_Stroke_({color: '#9696EB', width: 1})
stroke: new Stroke({color: '#9696EB', width: 1})
}));
vectorSource.addFeature(feature);
@@ -69,9 +69,9 @@ describe('ol.rendering.style.LineString', function() {
)
});
feature.setStyle([new Style({
stroke: new _ol_style_Stroke_({color: '#F2F211', width: 5})
stroke: new Stroke({color: '#F2F211', width: 5})
}), new Style({
stroke: new _ol_style_Stroke_({color: '#292921', width: 1})
stroke: new Stroke({color: '#292921', width: 1})
})]);
vectorSource.addFeature(feature);
@@ -81,7 +81,7 @@ describe('ol.rendering.style.LineString', function() {
)
});
feature.setStyle(new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#000000',
width: 2,
lineCap: 'square',
@@ -97,7 +97,7 @@ describe('ol.rendering.style.LineString', function() {
)
});
feature.setStyle(new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#000000',
width: 2,
lineCap: 'square',

View File

@@ -6,7 +6,7 @@ import VectorLayer from '../../../../src/ol/layer/Vector.js';
import VectorSource from '../../../../src/ol/source/Vector.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';
import Stroke from '../../../../src/ol/style/Stroke.js';
describe('ol.rendering.style.Polygon', function() {
@@ -104,7 +104,7 @@ describe('ol.rendering.style.Polygon', function() {
describe('different types with stroke', function() {
function createFeatures() {
var stroke = new _ol_style_Stroke_({
var stroke = new Stroke({
width: 10,
color: '#000',
lineJoin: 'round',
@@ -237,7 +237,7 @@ describe('ol.rendering.style.Polygon', function() {
});
feature.setStyle(new Style({
fill: new Fill({color: '#9696EB'}),
stroke: new _ol_style_Stroke_({color: '#9696EB', width: 1})
stroke: new Stroke({color: '#9696EB', width: 1})
}));
vectorSource.addFeature(feature);
@@ -249,7 +249,7 @@ describe('ol.rendering.style.Polygon', function() {
});
feature.setStyle(new Style({
fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}),
stroke: new _ol_style_Stroke_({color: '#DE213A', width: 3})
stroke: new Stroke({color: '#DE213A', width: 3})
}));
vectorSource.addFeature(feature);
@@ -261,7 +261,7 @@ describe('ol.rendering.style.Polygon', function() {
});
feature.setStyle(new Style({
fill: new Fill({color: 'rgba(18, 204, 105, 0.3)'}),
stroke: new _ol_style_Stroke_({color: '#032E17', width: 2})
stroke: new Stroke({color: '#032E17', width: 2})
}));
vectorSource.addFeature(feature);
}
@@ -323,7 +323,7 @@ describe('ol.rendering.style.Polygon', function() {
});
feature.setStyle(new Style({
fill: new Fill({color: createPattern()}),
stroke: new _ol_style_Stroke_({color: createRainbowGradient(), width: 3})
stroke: new Stroke({color: createRainbowGradient(), width: 3})
}));
vectorSource.addFeature(feature);
}

View File

@@ -7,7 +7,7 @@ import VectorSource from '../../../../src/ol/source/Vector.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';
import Stroke from '../../../../src/ol/style/Stroke.js';
describe('ol.rendering.style.RegularShape', function() {
@@ -108,7 +108,7 @@ describe('ol.rendering.style.RegularShape', function() {
describe('#render', function() {
var stroke = new _ol_style_Stroke_({width: 2});
var stroke = new Stroke({width: 2});
var fill = new Fill({color: 'red'});
it('tests the canvas renderer', function(done) {
@@ -119,7 +119,7 @@ describe('ol.rendering.style.RegularShape', function() {
it('supports lineDash', function(done) {
createMap('canvas');
createFeatures(new _ol_style_Stroke_({
createFeatures(new Stroke({
lineDash: [10, 5]
}));
expectResemble(map, 'rendering/ol/style/expected/regularshape-canvas-linedash.png', 5, done);
@@ -127,7 +127,7 @@ describe('ol.rendering.style.RegularShape', function() {
it('supports lineDashOffset', function(done) {
createMap('canvas');
createFeatures(new _ol_style_Stroke_({
createFeatures(new Stroke({
lineDash: [10, 5],
lineDashOffset: 5
}));
@@ -143,7 +143,7 @@ describe('ol.rendering.style.RegularShape', function() {
});
describe('uses the default fill and stroke color', function() {
var stroke = new _ol_style_Stroke_();
var stroke = new Stroke();
var fill = new Fill();
it('tests the canvas renderer', function(done) {

View File

@@ -11,7 +11,7 @@ import VectorSource from '../../../../src/ol/source/Vector.js';
import _ol_style_Text_ from '../../../../src/ol/style/Text.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';
import Stroke from '../../../../src/ol/style/Stroke.js';
describe('ol.rendering.style.Text', function() {
@@ -72,7 +72,7 @@ describe('ol.rendering.style.Text', function() {
color: 'red',
font: '12px sans-serif'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: '#000',
width: 3
})
@@ -89,7 +89,7 @@ describe('ol.rendering.style.Text', function() {
rotateWithView: true,
text: 'hello',
font: '10px sans-serif',
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: [10, 10, 10, 0.5]
})
})
@@ -108,7 +108,7 @@ describe('ol.rendering.style.Text', function() {
var geom = new LineString();
geom.setFlatCoordinates('XY', coords);
var style = new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'red'
}),
text: new _ol_style_Text_({
@@ -118,7 +118,7 @@ describe('ol.rendering.style.Text', function() {
textAlign: textAlign,
maxAngle: maxAngle,
placement: 'line',
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: strokeColor || 'white',
width: strokeWidth
})
@@ -339,14 +339,14 @@ describe('ol.rendering.style.Text', function() {
features[1].getStyle().getText().setBackgroundFill(new Fill({
color: 'red'
}));
features[1].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({
features[1].getStyle().getText().setBackgroundStroke(new Stroke({
color: 'blue',
width: 3
}));
features[2].getStyle().getText().setBackgroundFill(new Fill({
color: 'red'
}));
features[2].getStyle().getText().setBackgroundStroke(new _ol_style_Stroke_({
features[2].getStyle().getText().setBackgroundStroke(new Stroke({
color: 'blue',
width: 3
}));