From dc6ae2293d6842d7fd01585212c0932f81af9203 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 11 Jan 2018 13:23:27 -0700 Subject: [PATCH] Rename _ol_style_Fill_ to Fill --- examples/blend-modes.js | 8 ++--- examples/canvas-gradient-pattern.js | 4 +-- examples/center.js | 6 ++-- examples/cluster.js | 6 ++-- examples/custom-interactions.js | 4 +-- examples/drag-and-drop-image-vector.js | 10 +++---- examples/drag-and-drop.js | 10 +++---- examples/draw-and-modify-features.js | 6 ++-- examples/dynamic-data.js | 8 ++--- examples/earthquake-clusters.js | 10 +++---- examples/earthquake-custom-symbol.js | 4 +-- examples/feature-move-animation.js | 4 +-- examples/geojson.js | 10 +++---- examples/geolocation.js | 4 +-- examples/gpx.js | 4 +-- examples/igc.js | 4 +-- examples/image-vector-layer.js | 6 ++-- examples/kml-earthquakes.js | 4 +-- examples/kml-timezones.js | 4 +-- examples/layer-z-index.js | 8 ++--- examples/mapbox-vector-tiles-advanced.js | 4 +-- examples/mapbox-vector-tiles.js | 4 +-- examples/measure.js | 10 +++---- examples/modify-test.js | 12 ++++---- examples/osm-vector-tiles.js | 6 ++-- examples/polygon-styles.js | 6 ++-- examples/regularshape.js | 4 +-- examples/render-geometry.js | 4 +-- examples/snap.js | 6 ++-- examples/street-labels.js | 4 +-- examples/symbol-atlas-webgl.js | 6 ++-- examples/synthetic-points.js | 6 ++-- examples/topojson.js | 4 +-- examples/topolis.js | 12 ++++---- examples/vector-esri.js | 10 +++---- examples/vector-label-decluttering.js | 6 ++-- examples/vector-labels.js | 8 ++--- examples/vector-layer.js | 10 +++---- examples/vector-osm.js | 10 +++---- src/ol/Graticule.js | 6 ++-- src/ol/format/KML.js | 8 ++--- src/ol/style/Fill.js | 14 ++++----- src/ol/style/Style.js | 8 ++--- src/ol/style/Text.js | 4 +-- test/rendering/ol/layer/tile.test.js | 4 +-- test/rendering/ol/layer/vector.test.js | 14 ++++----- test/rendering/ol/layer/vectortile.test.js | 6 ++-- test/rendering/ol/render.test.js | 6 ++-- test/rendering/ol/style/circle.test.js | 18 +++++------ test/rendering/ol/style/polygon.test.js | 18 +++++------ test/rendering/ol/style/regularshape.test.js | 6 ++-- test/rendering/ol/style/text.test.js | 10 +++---- test/spec/ol/format/kml.test.js | 22 +++++++------- test/spec/ol/render/canvas/immediate.test.js | 4 +-- .../spec/ol/render/webgl/circlereplay.test.js | 4 +-- test/spec/ol/render/webgl/immediate.test.js | 4 +-- .../ol/render/webgl/polygonreplay.test.js | 6 ++-- test/spec/ol/render/webgl/textreplay.test.js | 16 +++++----- test/spec/ol/renderer/canvas/replay.test.js | 10 +++---- test/spec/ol/renderer/vector.test.js | 4 +-- test/spec/ol/style/circle.test.js | 30 +++++++++---------- test/spec/ol/style/fill.test.js | 10 +++---- test/spec/ol/style/regularshape.test.js | 28 ++++++++--------- test/spec/ol/style/style.test.js | 10 +++---- test/spec/ol/style/text.test.js | 10 +++---- 65 files changed, 268 insertions(+), 268 deletions(-) diff --git a/examples/blend-modes.js b/examples/blend-modes.js index 3541d6fc90..555682be14 100644 --- a/examples/blend-modes.js +++ b/examples/blend-modes.js @@ -5,7 +5,7 @@ import Point from '../src/ol/geom/Point.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'; @@ -20,7 +20,7 @@ var redLayer = new VectorLayer({ }), style: new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,0,0,0.8)' }), stroke: new _ol_style_Stroke_({ @@ -38,7 +38,7 @@ var greenLayer = new VectorLayer({ }), style: new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,255,0,0.8)' }), stroke: new _ol_style_Stroke_({ @@ -55,7 +55,7 @@ var blueLayer = new VectorLayer({ }), style: new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,0,255,0.8)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/canvas-gradient-pattern.js b/examples/canvas-gradient-pattern.js index ceb4573098..1291293dc4 100644 --- a/examples/canvas-gradient-pattern.js +++ b/examples/canvas-gradient-pattern.js @@ -6,7 +6,7 @@ import _ol_has_ from '../src/ol/has.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import {fromLonLat} from '../src/ol/proj.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_Stroke_ from '../src/ol/style/Stroke.js'; import Style from '../src/ol/style/Style.js'; @@ -57,7 +57,7 @@ var pattern = (function() { }()); // Generate style for gradient or pattern fill -var fill = new _ol_style_Fill_(); +var fill = new Fill(); var style = new Style({ fill: fill, stroke: new _ol_style_Stroke_({ diff --git a/examples/center.js b/examples/center.js index 8ffa8e0a13..27c41be7bf 100644 --- a/examples/center.js +++ b/examples/center.js @@ -7,7 +7,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -16,7 +16,7 @@ var source = new VectorSource({ format: new GeoJSON() }); var style = new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.6)' }), stroke: new _ol_style_Stroke_({ @@ -25,7 +25,7 @@ var style = new Style({ }), image: new _ol_style_Circle_({ radius: 5, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.6)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/cluster.js b/examples/cluster.js index aceafc6e80..66669ccfdc 100644 --- a/examples/cluster.js +++ b/examples/cluster.js @@ -8,7 +8,7 @@ import Cluster from '../src/ol/source/Cluster.js'; import OSM from '../src/ol/source/OSM.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'; @@ -46,13 +46,13 @@ var clusters = new VectorLayer({ stroke: new _ol_style_Stroke_({ color: '#fff' }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#3399CC' }) }), text: new _ol_style_Text_({ text: size.toString(), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#fff' }) }) diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js index 11d5901ad8..5fdca8cd4b 100644 --- a/examples/custom-interactions.js +++ b/examples/custom-interactions.js @@ -11,7 +11,7 @@ import TileLayer from '../src/ol/layer/Tile.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import TileJSON from '../src/ol/source/TileJSON.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_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'; @@ -168,7 +168,7 @@ var map = new Map({ width: 3, color: [255, 0, 0, 1] }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: [0, 0, 255, 0.6] }) }) diff --git a/examples/drag-and-drop-image-vector.js b/examples/drag-and-drop-image-vector.js index ba7ea9f0ee..af17dfa7b1 100644 --- a/examples/drag-and-drop-image-vector.js +++ b/examples/drag-and-drop-image-vector.js @@ -12,7 +12,7 @@ import TileLayer from '../src/ol/layer/Tile.js'; import BingMaps from '../src/ol/source/BingMaps.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'; @@ -20,7 +20,7 @@ import Style from '../src/ol/style/Style.js'; var defaultStyle = { 'Point': new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,255,0,0.5)' }), radius: 5, @@ -37,7 +37,7 @@ var defaultStyle = { }) }), 'Polygon': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,255,255,0.5)' }), stroke: new _ol_style_Stroke_({ @@ -47,7 +47,7 @@ var defaultStyle = { }), 'MultiPoint': new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,0,255,0.5)' }), radius: 5, @@ -64,7 +64,7 @@ var defaultStyle = { }) }), 'MultiPolygon': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,0,255,0.5)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/drag-and-drop.js b/examples/drag-and-drop.js index 917200124f..6759be7abb 100644 --- a/examples/drag-and-drop.js +++ b/examples/drag-and-drop.js @@ -12,7 +12,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import BingMaps from '../src/ol/source/BingMaps.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'; @@ -20,7 +20,7 @@ import Style from '../src/ol/style/Style.js'; var defaultStyle = { 'Point': new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,255,0,0.5)' }), radius: 5, @@ -37,7 +37,7 @@ var defaultStyle = { }) }), 'Polygon': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,255,255,0.5)' }), stroke: new _ol_style_Stroke_({ @@ -47,7 +47,7 @@ var defaultStyle = { }), 'MultiPoint': new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,0,255,0.5)' }), radius: 5, @@ -64,7 +64,7 @@ var defaultStyle = { }) }), 'MultiPolygon': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,0,255,0.5)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/draw-and-modify-features.js b/examples/draw-and-modify-features.js index a2f7b967a9..182af6edaf 100644 --- a/examples/draw-and-modify-features.js +++ b/examples/draw-and-modify-features.js @@ -8,7 +8,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -20,7 +20,7 @@ var source = new VectorSource(); var vector = new VectorLayer({ source: source, style: new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.2)' }), stroke: new _ol_style_Stroke_({ @@ -29,7 +29,7 @@ var vector = new VectorLayer({ }), image: new _ol_style_Circle_({ radius: 7, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#ffcc33' }) }) diff --git a/examples/dynamic-data.js b/examples/dynamic-data.js index 7c2de24d59..0f74528988 100644 --- a/examples/dynamic-data.js +++ b/examples/dynamic-data.js @@ -5,7 +5,7 @@ import Point from '../src/ol/geom/Point.js'; import TileLayer from '../src/ol/layer/Tile.js'; import OSM from '../src/ol/source/OSM.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'; @@ -27,7 +27,7 @@ var imageStyle = new Style({ image: 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}) }) }); @@ -36,7 +36,7 @@ var headInnerImageStyle = new Style({ image: new _ol_style_Circle_({ radius: 2, snapToPixel: false, - fill: new _ol_style_Fill_({color: 'blue'}) + fill: new Fill({color: 'blue'}) }) }); @@ -44,7 +44,7 @@ var headOuterImageStyle = new Style({ image: new _ol_style_Circle_({ radius: 5, snapToPixel: false, - fill: new _ol_style_Fill_({color: 'black'}) + fill: new Fill({color: 'black'}) }) }); diff --git a/examples/earthquake-clusters.js b/examples/earthquake-clusters.js index 6e9a0e9ed6..6ba9c4f3f2 100644 --- a/examples/earthquake-clusters.js +++ b/examples/earthquake-clusters.js @@ -10,28 +10,28 @@ import Cluster from '../src/ol/source/Cluster.js'; import Stamen from '../src/ol/source/Stamen.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_RegularShape_ from '../src/ol/style/RegularShape.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'; -var earthquakeFill = new _ol_style_Fill_({ +var earthquakeFill = new Fill({ color: 'rgba(255, 153, 0, 0.8)' }); var earthquakeStroke = new _ol_style_Stroke_({ color: 'rgba(255, 204, 0, 0.2)', width: 1 }); -var textFill = new _ol_style_Fill_({ +var textFill = new Fill({ color: '#fff' }); var textStroke = new _ol_style_Stroke_({ color: 'rgba(0, 0, 0, 0.6)', width: 3 }); -var invisibleFill = new _ol_style_Fill_({ +var invisibleFill = new Fill({ color: 'rgba(255, 255, 255, 0.01)' }); @@ -88,7 +88,7 @@ function styleFunction(feature, resolution) { style = new Style({ image: new _ol_style_Circle_({ radius: feature.get('radius'), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: [255, 153, 0, Math.min(0.8, 0.4 + (size / maxFeatureCount))] }) }), diff --git a/examples/earthquake-custom-symbol.js b/examples/earthquake-custom-symbol.js index fd3a756a84..74832551bf 100644 --- a/examples/earthquake-custom-symbol.js +++ b/examples/earthquake-custom-symbol.js @@ -7,7 +7,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import _ol_render_ from '../src/ol/render.js'; import Stamen from '../src/ol/source/Stamen.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_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'; @@ -36,7 +36,7 @@ var styleFunction = function(feature) { /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d')), {size: [size, size], pixelRatio: 1}); vectorContext.setStyle(new Style({ - fill: new _ol_style_Fill_({color: 'rgba(255, 153, 0, 0.4)'}), + fill: new Fill({color: 'rgba(255, 153, 0, 0.4)'}), stroke: new _ol_style_Stroke_({color: 'rgba(255, 204, 0, 0.2)', width: 2}) })); vectorContext.drawGeometry(new Polygon([symbol.map(scaleFunction)])); diff --git a/examples/feature-move-animation.js b/examples/feature-move-animation.js index c142c2ff4e..c99ed86423 100644 --- a/examples/feature-move-animation.js +++ b/examples/feature-move-animation.js @@ -8,7 +8,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import BingMaps from '../src/ol/source/BingMaps.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_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'; @@ -100,7 +100,7 @@ var styles = { image: new _ol_style_Circle_({ radius: 7, snapToPixel: false, - fill: new _ol_style_Fill_({color: 'black'}), + fill: new Fill({color: 'black'}), stroke: new _ol_style_Stroke_({ color: 'white', width: 2 }) diff --git a/examples/geojson.js b/examples/geojson.js index 2ec7aa15ce..c9d5fda1b8 100644 --- a/examples/geojson.js +++ b/examples/geojson.js @@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -44,7 +44,7 @@ var styles = { color: 'yellow', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 0, 0.1)' }) }), @@ -54,7 +54,7 @@ var styles = { lineDash: [4], width: 3 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0, 0, 255, 0.1)' }) }), @@ -63,7 +63,7 @@ var styles = { color: 'magenta', width: 2 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'magenta' }), image: new _ol_style_Circle_({ @@ -79,7 +79,7 @@ var styles = { color: 'red', width: 2 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,0,0,0.2)' }) }) diff --git a/examples/geolocation.js b/examples/geolocation.js index a4c5a47b65..471becd32f 100644 --- a/examples/geolocation.js +++ b/examples/geolocation.js @@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -70,7 +70,7 @@ var positionFeature = new Feature(); positionFeature.setStyle(new Style({ image: new _ol_style_Circle_({ radius: 6, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#3399CC' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/gpx.js b/examples/gpx.js index d17cac8ca8..4744598147 100644 --- a/examples/gpx.js +++ b/examples/gpx.js @@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import BingMaps from '../src/ol/source/BingMaps.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'; @@ -20,7 +20,7 @@ var raster = new TileLayer({ var style = { 'Point': new Style({ image: new _ol_style_Circle_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,255,0,0.4)' }), radius: 5, diff --git a/examples/igc.js b/examples/igc.js index 9d652574bf..fc5854daca 100644 --- a/examples/igc.js +++ b/examples/igc.js @@ -10,7 +10,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -181,7 +181,7 @@ var featureOverlay = new VectorLayer({ style: new Style({ image: new _ol_style_Circle_({ radius: 5, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,0,0,0.9)' }) }) diff --git a/examples/image-vector-layer.js b/examples/image-vector-layer.js index 2627c065af..13fb0edb12 100644 --- a/examples/image-vector-layer.js +++ b/examples/image-vector-layer.js @@ -3,14 +3,14 @@ import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.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_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'; var style = new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.6)' }), stroke: new _ol_style_Stroke_({ @@ -49,7 +49,7 @@ var featureOverlay = new VectorLayer({ color: '#f00', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,0,0,0.1)' }) }) diff --git a/examples/kml-earthquakes.js b/examples/kml-earthquakes.js index c5c315a884..a37e2e1577 100644 --- a/examples/kml-earthquakes.js +++ b/examples/kml-earthquakes.js @@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import Stamen from '../src/ol/source/Stamen.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'; @@ -24,7 +24,7 @@ var styleFunction = function(feature) { style = new Style({ image: new _ol_style_Circle_({ radius: radius, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 153, 0, 0.4)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/kml-timezones.js b/examples/kml-timezones.js index 88d3849308..00554dcea4 100644 --- a/examples/kml-timezones.js +++ b/examples/kml-timezones.js @@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import Stamen from '../src/ol/source/Stamen.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_Stroke_ from '../src/ol/style/Stroke.js'; import Style from '../src/ol/style/Style.js'; @@ -36,7 +36,7 @@ var styleFunction = function(feature) { } var opacity = 0.75 * (1 - delta / 12); return new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: [0xff, 0xff, 0x33, opacity] }), stroke: new _ol_style_Stroke_({ diff --git a/examples/layer-z-index.js b/examples/layer-z-index.js index 980faa62db..e286d8aea9 100644 --- a/examples/layer-z-index.js +++ b/examples/layer-z-index.js @@ -4,7 +4,7 @@ import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.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 _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import Style from '../src/ol/style/Style.js'; @@ -15,7 +15,7 @@ var stroke = new _ol_style_Stroke_({color: 'black', width: 1}); var styles = { 'square': new Style({ image: new _ol_style_RegularShape_({ - fill: new _ol_style_Fill_({color: 'blue'}), + fill: new Fill({color: 'blue'}), stroke: stroke, points: 4, radius: 80, @@ -24,7 +24,7 @@ var styles = { }), 'triangle': new Style({ image: new _ol_style_RegularShape_({ - fill: new _ol_style_Fill_({color: 'red'}), + fill: new Fill({color: 'red'}), stroke: stroke, points: 3, radius: 80, @@ -34,7 +34,7 @@ var styles = { }), 'star': new Style({ image: new _ol_style_RegularShape_({ - fill: new _ol_style_Fill_({color: 'green'}), + fill: new Fill({color: 'green'}), stroke: stroke, points: 5, radius: 80, diff --git a/examples/mapbox-vector-tiles-advanced.js b/examples/mapbox-vector-tiles-advanced.js index 4359817c5d..463133b4ee 100644 --- a/examples/mapbox-vector-tiles-advanced.js +++ b/examples/mapbox-vector-tiles-advanced.js @@ -4,7 +4,7 @@ import MVT from '../src/ol/format/MVT.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import {get as getProjection} from '../src/ol/proj.js'; import VectorTileSource from '../src/ol/source/VectorTile.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'; @@ -45,7 +45,7 @@ var map = new Map({ }), tileUrlFunction: tileUrlFunction }), - style: createMapboxStreetsV6Style(Style, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) + style: createMapboxStreetsV6Style(Style, Fill, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) }) ], target: 'map', diff --git a/examples/mapbox-vector-tiles.js b/examples/mapbox-vector-tiles.js index 1000b987c1..d4aac95a47 100644 --- a/examples/mapbox-vector-tiles.js +++ b/examples/mapbox-vector-tiles.js @@ -3,7 +3,7 @@ import View from '../src/ol/View.js'; import MVT from '../src/ol/format/MVT.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import VectorTileSource from '../src/ol/source/VectorTile.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'; @@ -24,7 +24,7 @@ var map = new Map({ url: 'https://{a-d}.tiles.mapbox.com/v4/mapbox.mapbox-streets-v6/' + '{z}/{x}/{y}.vector.pbf?access_token=' + key }), - style: createMapboxStreetsV6Style(Style, _ol_style_Fill_, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) + style: createMapboxStreetsV6Style(Style, Fill, _ol_style_Stroke_, _ol_style_Icon_, _ol_style_Text_) }) ], target: 'map', diff --git a/examples/measure.js b/examples/measure.js index e084737cb1..90ad489d8b 100644 --- a/examples/measure.js +++ b/examples/measure.js @@ -11,7 +11,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -25,7 +25,7 @@ var source = new VectorSource(); var vector = new VectorLayer({ source: source, style: new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.2)' }), stroke: new _ol_style_Stroke_({ @@ -34,7 +34,7 @@ var vector = new VectorLayer({ }), image: new _ol_style_Circle_({ radius: 7, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#ffcc33' }) }) @@ -181,7 +181,7 @@ function addInteraction() { source: source, type: type, style: new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.2)' }), stroke: new _ol_style_Stroke_({ @@ -194,7 +194,7 @@ function addInteraction() { stroke: new _ol_style_Stroke_({ color: 'rgba(0, 0, 0, 0.7)' }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.2)' }) }) diff --git a/examples/modify-test.js b/examples/modify-test.js index 4652665be3..2133749dab 100644 --- a/examples/modify-test.js +++ b/examples/modify-test.js @@ -7,7 +7,7 @@ import Select from '../src/ol/interaction/Select.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'; @@ -25,7 +25,7 @@ var styleFunction = (function() { color: 'blue', width: 3 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0, 0, 255, 0.1)' }) }); @@ -40,7 +40,7 @@ var styleFunction = (function() { color: 'yellow', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 0, 0.1)' }) }); @@ -49,7 +49,7 @@ var styleFunction = (function() { color: 'red', width: 3 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 0, 0, 0.1)' }), image: image @@ -157,7 +157,7 @@ var overlayStyle = (function() { var styles = {}; styles['Polygon'] = [ new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: [255, 255, 255, 0.5] }) }), @@ -196,7 +196,7 @@ var overlayStyle = (function() { new Style({ image: new _ol_style_Circle_({ radius: 7, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: [0, 153, 255, 1] }), stroke: new _ol_style_Stroke_({ diff --git a/examples/osm-vector-tiles.js b/examples/osm-vector-tiles.js index dd490963c1..3fd1a68f80 100644 --- a/examples/osm-vector-tiles.js +++ b/examples/osm-vector-tiles.js @@ -4,7 +4,7 @@ import TopoJSON from '../src/ol/format/TopoJSON.js'; import VectorTileLayer from '../src/ol/layer/VectorTile.js'; import {fromLonLat} from '../src/ol/proj.js'; import VectorTileSource from '../src/ol/source/VectorTile.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'; @@ -17,7 +17,7 @@ var roadColor = { 'highway': '#f39' }; var buildingStyle = new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#666', opacity: 0.4 }), @@ -27,7 +27,7 @@ var buildingStyle = new Style({ }) }); var waterStyle = new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#9db9e8' }) }); diff --git a/examples/polygon-styles.js b/examples/polygon-styles.js index 8134f5762d..43f4c10750 100644 --- a/examples/polygon-styles.js +++ b/examples/polygon-styles.js @@ -5,7 +5,7 @@ import MultiPoint from '../src/ol/geom/MultiPoint.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'; @@ -22,14 +22,14 @@ var styles = [ color: 'blue', width: 3 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0, 0, 255, 0.1)' }) }), new Style({ image: new _ol_style_Circle_({ radius: 5, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'orange' }) }), diff --git a/examples/regularshape.js b/examples/regularshape.js index fde861489b..060ef936c0 100644 --- a/examples/regularshape.js +++ b/examples/regularshape.js @@ -4,14 +4,14 @@ import View from '../src/ol/View.js'; import Point from '../src/ol/geom/Point.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 _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import Style from '../src/ol/style/Style.js'; var stroke = new _ol_style_Stroke_({color: 'black', width: 2}); -var fill = new _ol_style_Fill_({color: 'red'}); +var fill = new Fill({color: 'red'}); var styles = { 'square': new Style({ diff --git a/examples/render-geometry.js b/examples/render-geometry.js index cafd0d616f..f334629ad6 100644 --- a/examples/render-geometry.js +++ b/examples/render-geometry.js @@ -3,7 +3,7 @@ import Point from '../src/ol/geom/Point.js'; import Polygon from '../src/ol/geom/Polygon.js'; import _ol_render_ from '../src/ol/render.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'; @@ -11,7 +11,7 @@ import Style from '../src/ol/style/Style.js'; var canvas = document.getElementById('canvas'); var vectorContext = _ol_render_.toContext(canvas.getContext('2d'), {size: [100, 100]}); -var fill = new _ol_style_Fill_({color: 'blue'}); +var fill = new Fill({color: 'blue'}); var stroke = new _ol_style_Stroke_({color: 'black'}); var style = new Style({ fill: fill, diff --git a/examples/snap.js b/examples/snap.js index 964f1220a5..8896399a5d 100644 --- a/examples/snap.js +++ b/examples/snap.js @@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -20,7 +20,7 @@ var raster = new TileLayer({ var vector = new VectorLayer({ source: new VectorSource(), style: new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.2)' }), stroke: new _ol_style_Stroke_({ @@ -29,7 +29,7 @@ var vector = new VectorLayer({ }), image: new _ol_style_Circle_({ radius: 7, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#ffcc33' }) }) diff --git a/examples/street-labels.js b/examples/street-labels.js index 56f1a4490d..4a5d178d01 100644 --- a/examples/street-labels.js +++ b/examples/street-labels.js @@ -6,7 +6,7 @@ import TileLayer from '../src/ol/layer/Tile.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import BingMaps from '../src/ol/source/BingMaps.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_Text_ from '../src/ol/style/Text.js'; @@ -14,7 +14,7 @@ var style = new Style({ text: new _ol_style_Text_({ font: 'bold 11px "Open Sans", "Arial Unicode MS", "sans-serif"', placement: 'line', - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'white' }) }) diff --git a/examples/symbol-atlas-webgl.js b/examples/symbol-atlas-webgl.js index 35dfb9da4c..d72bfe70ea 100644 --- a/examples/symbol-atlas-webgl.js +++ b/examples/symbol-atlas-webgl.js @@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import VectorSource from '../src/ol/source/Vector.js'; 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_RegularShape_ from '../src/ol/style/RegularShape.js'; import _ol_style_Stroke_ from '../src/ol/style/Stroke.js'; import Style from '../src/ol/style/Style.js'; @@ -51,7 +51,7 @@ for (i = 0; i < symbolInfo.length; ++i) { opacity: info.opacity, scale: info.scale, radius: radiuses[j], - fill: new _ol_style_Fill_({ + fill: new Fill({ color: info.fillColor }), stroke: new _ol_style_Stroke_({ @@ -71,7 +71,7 @@ for (i = 0; i < symbolInfo.length; ++i) { radius: radiuses[j], radius2: radiuses[j] * 0.7, angle: 1.4, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: info.fillColor }), stroke: new _ol_style_Stroke_({ diff --git a/examples/synthetic-points.js b/examples/synthetic-points.js index 51f5a3fafe..d08eafda2e 100644 --- a/examples/synthetic-points.js +++ b/examples/synthetic-points.js @@ -6,7 +6,7 @@ import Point from '../src/ol/geom/Point.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'; @@ -27,14 +27,14 @@ var styles = { '10': new Style({ image: new _ol_style_Circle_({ radius: 5, - fill: new _ol_style_Fill_({color: '#666666'}), + fill: new Fill({color: '#666666'}), stroke: new _ol_style_Stroke_({color: '#bada55', width: 1}) }) }), '20': new Style({ image: new _ol_style_Circle_({ radius: 10, - fill: new _ol_style_Fill_({color: '#666666'}), + fill: new Fill({color: '#666666'}), stroke: new _ol_style_Stroke_({color: '#bada55', width: 1}) }) }) diff --git a/examples/topojson.js b/examples/topojson.js index fcc39c7667..0d0dd2d61c 100644 --- a/examples/topojson.js +++ b/examples/topojson.js @@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js'; import VectorLayer from '../src/ol/layer/Vector.js'; import TileJSON from '../src/ol/source/TileJSON.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_Stroke_ from '../src/ol/style/Stroke.js'; import Style from '../src/ol/style/Style.js'; @@ -17,7 +17,7 @@ var raster = new TileLayer({ }); var style = new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.6)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/topolis.js b/examples/topolis.js index e018f792cd..a3eb862218 100644 --- a/examples/topolis.js +++ b/examples/topolis.js @@ -15,7 +15,7 @@ import OSM from '../src/ol/source/OSM.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 _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_Text_ from '../src/ol/style/Text.js'; import MousePosition from '../src/ol/control/MousePosition.js'; @@ -31,12 +31,12 @@ var nodesLayer = new VectorLayer({ var style = new Style({ image: new _ol_style_Circle_({ radius: 8, - fill: new _ol_style_Fill_({color: 'rgba(255, 0, 0, 0.2)'}), + fill: new Fill({color: 'rgba(255, 0, 0, 0.2)'}), stroke: new _ol_style_Stroke_({color: 'red', width: 1}) }), text: new _ol_style_Text_({ text: f.get('node').id.toString(), - fill: new _ol_style_Fill_({color: 'red'}), + fill: new Fill({color: 'red'}), stroke: new _ol_style_Stroke_({ color: 'white', width: 3 @@ -58,7 +58,7 @@ var edgesLayer = new VectorLayer({ }), text: new _ol_style_Text_({ text: f.get('edge').id.toString(), - fill: new _ol_style_Fill_({color: 'blue'}), + fill: new Fill({color: 'blue'}), stroke: new _ol_style_Stroke_({ color: 'white', width: 2 @@ -78,13 +78,13 @@ var facesLayer = new VectorLayer({ color: 'black', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0, 255, 0, 0.2)' }), text: new _ol_style_Text_({ font: 'bold 12px sans-serif', text: f.get('face').id.toString(), - fill: new _ol_style_Fill_({color: 'green'}), + fill: new Fill({color: 'green'}), stroke: new _ol_style_Stroke_({ color: 'white', width: 2 diff --git a/examples/vector-esri.js b/examples/vector-esri.js index b7ea164b4e..3f08e040f6 100644 --- a/examples/vector-esri.js +++ b/examples/vector-esri.js @@ -7,7 +7,7 @@ import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js'; import {fromLonLat} from '../src/ol/proj.js'; import VectorSource from '../src/ol/source/Vector.js'; import XYZ from '../src/ol/source/XYZ.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_tilegrid_ from '../src/ol/tilegrid.js'; @@ -21,7 +21,7 @@ var esrijsonFormat = new EsriJSON(); var styleCache = { 'ABANDONED': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(225, 225, 225, 255)' }), stroke: new _ol_style_Stroke_({ @@ -30,7 +30,7 @@ var styleCache = { }) }), 'GAS': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 0, 0, 255)' }), stroke: new _ol_style_Stroke_({ @@ -39,7 +39,7 @@ var styleCache = { }) }), 'OIL': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(56, 168, 0, 255)' }), stroke: new _ol_style_Stroke_({ @@ -48,7 +48,7 @@ var styleCache = { }) }), 'OILGAS': new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(168, 112, 0, 255)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/vector-label-decluttering.js b/examples/vector-label-decluttering.js index 9b65088cb6..3a9b56d401 100644 --- a/examples/vector-label-decluttering.js +++ b/examples/vector-label-decluttering.js @@ -4,7 +4,7 @@ import * as _ol_extent_ from '../src/ol/extent.js'; import GeoJSON from '../src/ol/format/GeoJSON.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_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'; @@ -38,7 +38,7 @@ var labelStyle = new Style({ text: new _ol_style_Text_({ font: '12px Calibri,sans-serif', overflow: true, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#000' }), stroke: new _ol_style_Stroke_({ @@ -48,7 +48,7 @@ var labelStyle = new Style({ }) }); var countryStyle = new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.6)' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/vector-labels.js b/examples/vector-labels.js index a2ba95e8a9..a9f91f19cd 100644 --- a/examples/vector-labels.js +++ b/examples/vector-labels.js @@ -6,7 +6,7 @@ import VectorLayer from '../src/ol/layer/Vector.js'; import OSM from '../src/ol/source/OSM.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'; @@ -114,7 +114,7 @@ var createTextStyle = function(feature, resolution, dom) { textBaseline: baseline, font: font, text: getText(feature, resolution, dom), - fill: new _ol_style_Fill_({color: fillColor}), + fill: new Fill({color: fillColor}), stroke: new _ol_style_Stroke_({color: outlineColor, width: outlineWidth}), offsetX: offsetX, offsetY: offsetY, @@ -133,7 +133,7 @@ function polygonStyleFunction(feature, resolution) { color: 'blue', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0, 0, 255, 0.1)' }), text: createTextStyle(feature, resolution, myDom.polygons) @@ -174,7 +174,7 @@ function pointStyleFunction(feature, resolution) { return new Style({ image: new _ol_style_Circle_({ radius: 10, - 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: 'red', width: 1}) }), text: createTextStyle(feature, resolution, myDom.points) diff --git a/examples/vector-layer.js b/examples/vector-layer.js index 8f5d7df56d..f7666c3796 100644 --- a/examples/vector-layer.js +++ b/examples/vector-layer.js @@ -3,14 +3,14 @@ import View from '../src/ol/View.js'; import GeoJSON from '../src/ol/format/GeoJSON.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_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'; var style = new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255, 255, 255, 0.6)' }), stroke: new _ol_style_Stroke_({ @@ -19,7 +19,7 @@ var style = new Style({ }), text: new _ol_style_Text_({ font: '12px Calibri,sans-serif', - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#000' }), stroke: new _ol_style_Stroke_({ @@ -54,12 +54,12 @@ var highlightStyle = new Style({ color: '#f00', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(255,0,0,0.1)' }), text: new _ol_style_Text_({ font: '12px Calibri,sans-serif', - fill: new _ol_style_Fill_({ + fill: new Fill({ color: '#000' }), stroke: new _ol_style_Stroke_({ diff --git a/examples/vector-osm.js b/examples/vector-osm.js index 3f1d953415..77425061aa 100644 --- a/examples/vector-osm.js +++ b/examples/vector-osm.js @@ -9,7 +9,7 @@ import {transformExtent} from '../src/ol/proj.js'; import BingMaps from '../src/ol/source/BingMaps.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'; @@ -22,7 +22,7 @@ var styles = { color: 'rgba(170, 170, 170, 1.0)', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(170, 170, 170, 0.3)' }) }) @@ -34,7 +34,7 @@ var styles = { color: 'rgba(246, 99, 79, 1.0)', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(246, 99, 79, 0.3)' }) }) @@ -59,7 +59,7 @@ var styles = { color: 'rgba(140, 208, 95, 1.0)', width: 1 }), - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(140, 208, 95, 0.3)' }) }) @@ -68,7 +68,7 @@ var styles = { 'tree': new Style({ image: new _ol_style_Circle_({ radius: 2, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(140, 208, 95, 1.0)' }), stroke: null diff --git a/src/ol/Graticule.js b/src/ol/Graticule.js index 5df54754dd..6498342a20 100644 --- a/src/ol/Graticule.js +++ b/src/ol/Graticule.js @@ -10,7 +10,7 @@ import _ol_geom_flat_geodesic_ from './geom/flat/geodesic.js'; import {clamp} from './math.js'; import {get as getProjection, equivalent as equivalentProjection, getTransform, transformExtent} from './proj.js'; import RenderEventType from './render/EventType.js'; -import _ol_style_Fill_ from './style/Fill.js'; +import Fill from './style/Fill.js'; import _ol_style_Stroke_ from './style/Stroke.js'; import _ol_style_Text_ from './style/Text.js'; @@ -286,7 +286,7 @@ var Graticule = function(opt_options) { new _ol_style_Text_({ font: '12px Calibri,sans-serif', textBaseline: 'bottom', - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,0,0,1)' }), stroke: new _ol_style_Stroke_({ @@ -303,7 +303,7 @@ var Graticule = function(opt_options) { new _ol_style_Text_({ font: '12px Calibri,sans-serif', textAlign: 'end', - fill: new _ol_style_Fill_({ + fill: new Fill({ color: 'rgba(0,0,0,1)' }), stroke: new _ol_style_Stroke_({ diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 394fcb86c3..83eeb36583 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -20,7 +20,7 @@ import Point from '../geom/Point.js'; import Polygon from '../geom/Polygon.js'; import {toRadians} from '../math.js'; import {get as getProjection} from '../proj.js'; -import _ol_style_Fill_ from '../style/Fill.js'; +import Fill from '../style/Fill.js'; import _ol_style_Icon_ from '../style/Icon.js'; import IconAnchorUnits from '../style/IconAnchorUnits.js'; import IconOrigin from '../style/IconOrigin.js'; @@ -145,7 +145,7 @@ KML.createStyleDefaults_ = function() { * @type {ol.style.Fill} * @private */ - KML.DEFAULT_FILL_STYLE_ = new _ol_style_Fill_({ + KML.DEFAULT_FILL_STYLE_ = new Fill({ color: KML.DEFAULT_COLOR_ }); @@ -666,7 +666,7 @@ KML.LabelStyleParser_ = function(node, objectStack) { } var styleObject = objectStack[objectStack.length - 1]; var textStyle = new _ol_style_Text_({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: /** @type {ol.Color} */ ('color' in object ? object['color'] : KML.DEFAULT_COLOR_) }), @@ -716,7 +716,7 @@ KML.PolyStyleParser_ = function(node, objectStack) { return; } var styleObject = objectStack[objectStack.length - 1]; - var fillStyle = new _ol_style_Fill_({ + var fillStyle = new Fill({ color: /** @type {ol.Color} */ ('color' in object ? object['color'] : KML.DEFAULT_COLOR_) }); diff --git a/src/ol/style/Fill.js b/src/ol/style/Fill.js index ebf65facb5..30fa9d7316 100644 --- a/src/ol/style/Fill.js +++ b/src/ol/style/Fill.js @@ -12,7 +12,7 @@ import {asString} from '../color.js'; * @param {olx.style.FillOptions=} opt_options Options. * @api */ -var _ol_style_Fill_ = function(opt_options) { +var Fill = function(opt_options) { var options = opt_options || {}; @@ -35,9 +35,9 @@ var _ol_style_Fill_ = function(opt_options) { * @return {ol.style.Fill} The cloned style. * @api */ -_ol_style_Fill_.prototype.clone = function() { +Fill.prototype.clone = function() { var color = this.getColor(); - return new _ol_style_Fill_({ + return new Fill({ color: (color && color.slice) ? color.slice() : color || undefined }); }; @@ -48,7 +48,7 @@ _ol_style_Fill_.prototype.clone = function() { * @return {ol.Color|ol.ColorLike} Color. * @api */ -_ol_style_Fill_.prototype.getColor = function() { +Fill.prototype.getColor = function() { return this.color_; }; @@ -59,7 +59,7 @@ _ol_style_Fill_.prototype.getColor = function() { * @param {ol.Color|ol.ColorLike} color Color. * @api */ -_ol_style_Fill_.prototype.setColor = function(color) { +Fill.prototype.setColor = function(color) { this.color_ = color; this.checksum_ = undefined; }; @@ -68,7 +68,7 @@ _ol_style_Fill_.prototype.setColor = function(color) { /** * @return {string} The checksum. */ -_ol_style_Fill_.prototype.getChecksum = function() { +Fill.prototype.getChecksum = function() { if (this.checksum_ === undefined) { if ( this.color_ instanceof CanvasPattern || @@ -82,4 +82,4 @@ _ol_style_Fill_.prototype.getChecksum = function() { return this.checksum_; }; -export default _ol_style_Fill_; +export default Fill; diff --git a/src/ol/style/Style.js b/src/ol/style/Style.js index 7185da082f..7fade69cad 100644 --- a/src/ol/style/Style.js +++ b/src/ol/style/Style.js @@ -4,7 +4,7 @@ import {assert} from '../asserts.js'; import GeometryType from '../geom/GeometryType.js'; import _ol_style_Circle_ from '../style/Circle.js'; -import _ol_style_Fill_ from '../style/Fill.js'; +import Fill from '../style/Fill.js'; import _ol_style_Stroke_ from '../style/Stroke.js'; /** @@ -322,7 +322,7 @@ Style.defaultFunction = function(feature, resolution) { // canvas.getContext('2d') at construction time, which will cause an.error // in such browsers.) if (!Style.default_) { - var fill = new _ol_style_Fill_({ + var fill = new Fill({ color: 'rgba(255,255,255,0.4)' }); var stroke = new _ol_style_Stroke_({ @@ -357,7 +357,7 @@ Style.createDefaultEditing = function() { var width = 3; styles[GeometryType.POLYGON] = [ new Style({ - fill: new _ol_style_Fill_({ + fill: new Fill({ color: [255, 255, 255, 0.5] }) }) @@ -392,7 +392,7 @@ Style.createDefaultEditing = function() { new Style({ image: new _ol_style_Circle_({ radius: width * 2, - fill: new _ol_style_Fill_({ + fill: new Fill({ color: blue }), stroke: new _ol_style_Stroke_({ diff --git a/src/ol/style/Text.js b/src/ol/style/Text.js index 279cece8ea..2f8c8ebfbe 100644 --- a/src/ol/style/Text.js +++ b/src/ol/style/Text.js @@ -1,7 +1,7 @@ /** * @module ol/style/Text */ -import _ol_style_Fill_ from '../style/Fill.js'; +import Fill from '../style/Fill.js'; import TextPlacement from '../style/TextPlacement.js'; /** @@ -63,7 +63,7 @@ var _ol_style_Text_ = function(opt_options) { * @type {ol.style.Fill} */ this.fill_ = options.fill !== undefined ? options.fill : - new _ol_style_Fill_({color: _ol_style_Text_.DEFAULT_FILL_COLOR_}); + new Fill({color: _ol_style_Text_.DEFAULT_FILL_COLOR_}); /** * @private diff --git a/test/rendering/ol/layer/tile.test.js b/test/rendering/ol/layer/tile.test.js index 36ad343f77..1690ab2e7c 100644 --- a/test/rendering/ol/layer/tile.test.js +++ b/test/rendering/ol/layer/tile.test.js @@ -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( diff --git a/test/rendering/ol/layer/vector.test.js b/test/rendering/ol/layer/vector.test.js index 3c5026091e..215843f88b 100644 --- a/test/rendering/ol/layer/vector.test.js +++ b/test/rendering/ol/layer/vector.test.js @@ -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] }) })); diff --git a/test/rendering/ol/layer/vectortile.test.js b/test/rendering/ol/layer/vectortile.test.js index fbd5cac5f6..d849d9a4c0 100644 --- a/test/rendering/ol/layer/vectortile.test.js +++ b/test/rendering/ol/layer/vectortile.test.js @@ -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' }) }), diff --git a/test/rendering/ol/render.test.js b/test/rendering/ol/render.test.js index 7063712b70..60c6ed44b5 100644 --- a/test/rendering/ol/render.test.js +++ b/test/rendering/ol/render.test.js @@ -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)' }) }); diff --git a/test/rendering/ol/style/circle.test.js b/test/rendering/ol/style/circle.test.js index 02452dd9a2..d673afe6e3 100644 --- a/test/rendering/ol/style/circle.test.js +++ b/test/rendering/ol/style/circle.test.js @@ -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_({ diff --git a/test/rendering/ol/style/polygon.test.js b/test/rendering/ol/style/polygon.test.js index 414656e722..907b33dcac 100644 --- a/test/rendering/ol/style/polygon.test.js +++ b/test/rendering/ol/style/polygon.test.js @@ -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); diff --git a/test/rendering/ol/style/regularshape.test.js b/test/rendering/ol/style/regularshape.test.js index 26e8685e02..fe1e2336e5 100644 --- a/test/rendering/ol/style/regularshape.test.js +++ b/test/rendering/ol/style/regularshape.test.js @@ -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'); diff --git a/test/rendering/ol/style/text.test.js b/test/rendering/ol/style/text.test.js index 9474aa4047..04f0d6a9ce 100644 --- a/test/rendering/ol/style/text.test.js +++ b/test/rendering/ol/style/text.test.js @@ -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_({ diff --git a/test/spec/ol/format/kml.test.js b/test/spec/ol/format/kml.test.js index 2c5172b428..9c90f430cd 100644 --- a/test/spec/ol/format/kml.test.js +++ b/test/spec/ol/format/kml.test.js @@ -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]); }); diff --git a/test/spec/ol/render/canvas/immediate.test.js b/test/spec/ol/render/canvas/immediate.test.js index d5a7c14e8d..982eafd2fc 100644 --- a/test/spec/ol/render/canvas/immediate.test.js +++ b/test/spec/ol/render/canvas/immediate.test.js @@ -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_({}); diff --git a/test/spec/ol/render/webgl/circlereplay.test.js b/test/spec/ol/render/webgl/circlereplay.test.js index 96463a08d8..48875635ea 100644 --- a/test/spec/ol/render/webgl/circlereplay.test.js +++ b/test/spec/ol/render/webgl/circlereplay.test.js @@ -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] }); diff --git a/test/spec/ol/render/webgl/immediate.test.js b/test/spec/ol/render/webgl/immediate.test.js index 5f37920c60..2f43240ab6 100644 --- a/test/spec/ol/render/webgl/immediate.test.js +++ b/test/spec/ol/render/webgl/immediate.test.js @@ -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); diff --git a/test/spec/ol/render/webgl/polygonreplay.test.js b/test/spec/ol/render/webgl/polygonreplay.test.js index d7fe75e5e9..545ccd52c1 100644 --- a/test/spec/ol/render/webgl/polygonreplay.test.js +++ b/test/spec/ol/render/webgl/polygonreplay.test.js @@ -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); diff --git a/test/spec/ol/render/webgl/textreplay.test.js b/test/spec/ol/render/webgl/textreplay.test.js index 11e7ab056b..6f5a5274ad 100644 --- a/test/spec/ol/render/webgl/textreplay.test.js +++ b/test/spec/ol/render/webgl/textreplay.test.js @@ -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'); diff --git a/test/spec/ol/renderer/canvas/replay.test.js b/test/spec/ol/renderer/canvas/replay.test.js index d9807079a3..51f5ac65eb 100644 --- a/test/spec/ol/renderer/canvas/replay.test.js +++ b/test/spec/ol/renderer/canvas/replay.test.js @@ -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}) }); diff --git a/test/spec/ol/renderer/vector.test.js b/test/spec/ol/renderer/vector.test.js index 5e1808a18e..62f86af42d 100644 --- a/test/spec/ol/renderer/vector.test.js +++ b/test/spec/ol/renderer/vector.test.js @@ -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; diff --git a/test/spec/ol/style/circle.test.js b/test/spec/ol/style/circle.test.js index 657d08fc97..f1f8c834b3 100644 --- a/test/spec/ol/style/circle.test.js +++ b/test/spec/ol/style/circle.test.js @@ -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' }) }); diff --git a/test/spec/ol/style/fill.test.js b/test/spec/ol/style/fill.test.js index cf5b151eda..449085fe9b 100644 --- a/test/spec/ol/style/fill.test.js +++ b/test/spec/ol/style/fill.test.js @@ -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(); diff --git a/test/spec/ol/style/regularshape.test.js b/test/spec/ol/style/regularshape.test.js index faf7a02de0..7d2c90e3ae 100644 --- a/test/spec/ol/style/regularshape.test.js +++ b/test/spec/ol/style/regularshape.test.js @@ -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_({ diff --git a/test/spec/ol/style/style.test.js b/test/spec/ol/style/style.test.js index 48ab73f405..7eca154061 100644 --- a/test/spec/ol/style/style.test.js +++ b/test/spec/ol/style/style.test.js @@ -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_({ diff --git a/test/spec/ol/style/text.test.js b/test/spec/ol/style/text.test.js index e3ae66d68d..5baa6d6085 100644 --- a/test/spec/ol/style/text.test.js +++ b/test/spec/ol/style/text.test.js @@ -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_({