Rename _ol_style_Circle_ to CircleStyle

This commit is contained in:
Tim Schaub
2018-01-11 13:27:54 -07:00
parent 16c8d2c246
commit 14ddcf843d
37 changed files with 133 additions and 133 deletions

View File

@@ -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_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -19,7 +19,7 @@ var redLayer = new VectorLayer({
features: [new Feature(new Point([0, 0]))]
}),
style: new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(255,0,0,0.8)'
}),
@@ -37,7 +37,7 @@ var greenLayer = new VectorLayer({
features: [new Feature(new Point([250, 433.013]))]
}),
style: new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(0,255,0,0.8)'
}),
@@ -54,7 +54,7 @@ var blueLayer = new VectorLayer({
features: [new Feature(new Point([500, 0]))]
}),
style: new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(0,0,255,0.8)'
}),

View File

@@ -6,7 +6,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -23,7 +23,7 @@ var style = new Style({
color: '#319FD3',
width: 1
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
fill: new Fill({
color: 'rgba(255, 255, 255, 0.6)'

View File

@@ -7,7 +7,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -41,7 +41,7 @@ var clusters = new VectorLayer({
var style = styleCache[size];
if (!style) {
style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
stroke: new Stroke({
color: '#fff'

View File

@@ -11,7 +11,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -19,7 +19,7 @@ import Style from '../src/ol/style/Style.js';
var defaultStyle = {
'Point': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(255,255,0,0.5)'
}),
@@ -46,7 +46,7 @@ var defaultStyle = {
})
}),
'MultiPoint': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(255,0,255,0.5)'
}),

View File

@@ -11,7 +11,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_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -19,7 +19,7 @@ import Style from '../src/ol/style/Style.js';
var defaultStyle = {
'Point': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(255,255,0,0.5)'
}),
@@ -46,7 +46,7 @@ var defaultStyle = {
})
}),
'MultiPoint': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(255,0,255,0.5)'
}),

View File

@@ -7,7 +7,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -27,7 +27,7 @@ var vector = new VectorLayer({
color: '#ffcc33',
width: 2
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 7,
fill: new Fill({
color: '#ffcc33'

View File

@@ -4,7 +4,7 @@ import MultiPoint from '../src/ol/geom/MultiPoint.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -24,7 +24,7 @@ var map = new Map({
});
var imageStyle = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
snapToPixel: false,
fill: new Fill({color: 'yellow'}),
@@ -33,7 +33,7 @@ var imageStyle = new Style({
});
var headInnerImageStyle = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
snapToPixel: false,
fill: new Fill({color: 'blue'})
@@ -41,7 +41,7 @@ var headInnerImageStyle = new Style({
});
var headOuterImageStyle = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
snapToPixel: false,
fill: new Fill({color: 'black'})

View File

@@ -9,7 +9,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import RegularShape from '../src/ol/style/RegularShape.js';
import Stroke from '../src/ol/style/Stroke.js';
@@ -86,7 +86,7 @@ function styleFunction(feature, resolution) {
var size = feature.get('features').length;
if (size > 1) {
style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: feature.get('radius'),
fill: new Fill({
color: [255, 153, 0, Math.min(0.8, 0.4 + (size / maxFeatureCount))]
@@ -107,7 +107,7 @@ function styleFunction(feature, resolution) {
function selectStyleFunction(feature) {
var styles = [new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: feature.get('radius'),
fill: invisibleFill
})

View File

@@ -10,7 +10,7 @@ import VectorLayer from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.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 CircleStyle from '../src/ol/style/Circle.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -67,7 +67,7 @@ function flash(feature) {
var opacity = easeOut(1 - elapsedRatio);
var style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: radius,
snapToPixel: false,
stroke: new Stroke({

View File

@@ -7,7 +7,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_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Icon from '../src/ol/style/Icon.js';
import Stroke from '../src/ol/style/Stroke.js';
@@ -97,7 +97,7 @@ var styles = {
})
}),
'geoMarker': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 7,
snapToPixel: false,
fill: new Fill({color: 'black'}),

View File

@@ -8,13 +8,13 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
var image = new _ol_style_Circle_({
var image = new CircleStyle({
radius: 5,
fill: null,
stroke: new Stroke({color: 'red', width: 1})
@@ -66,7 +66,7 @@ var styles = {
fill: new Fill({
color: 'magenta'
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
fill: null,
stroke: new Stroke({

View File

@@ -8,7 +8,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -68,7 +68,7 @@ geolocation.on('change:accuracyGeometry', function() {
var positionFeature = new Feature();
positionFeature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 6,
fill: new Fill({
color: '#3399CC'

View File

@@ -5,7 +5,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_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -19,7 +19,7 @@ var raster = new TileLayer({
var style = {
'Point': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'rgba(255,255,0,0.4)'
}),

View File

@@ -9,7 +9,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -158,7 +158,7 @@ var stroke = new Stroke({
});
var style = new Style({
stroke: stroke,
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
fill: null,
stroke: stroke
@@ -179,7 +179,7 @@ var featureOverlay = new VectorLayer({
source: new VectorSource(),
map: map,
style: new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
fill: new Fill({
color: 'rgba(255,0,0,0.9)'

View File

@@ -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_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -22,7 +22,7 @@ var styleFunction = function(feature) {
var style = styleCache[radius];
if (!style) {
style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: radius,
fill: new Fill({
color: 'rgba(255, 153, 0, 0.4)'

View File

@@ -10,7 +10,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -32,7 +32,7 @@ var vector = new VectorLayer({
color: '#ffcc33',
width: 2
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 7,
fill: new Fill({
color: '#ffcc33'
@@ -189,7 +189,7 @@ function addInteraction() {
lineDash: [10, 10],
width: 2
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.7)'

View File

@@ -6,7 +6,7 @@ import Modify from '../src/ol/interaction/Modify.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -14,7 +14,7 @@ import Style from '../src/ol/style/Style.js';
var styleFunction = (function() {
var styles = {};
var image = new _ol_style_Circle_({
var image = new CircleStyle({
radius: 5,
fill: null,
stroke: new Stroke({color: 'orange', width: 2})
@@ -194,7 +194,7 @@ var overlayStyle = (function() {
styles['Point'] = [
new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 7,
fill: new Fill({
color: [0, 153, 255, 1]

View File

@@ -4,7 +4,7 @@ import GeoJSON from '../src/ol/format/GeoJSON.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -27,7 +27,7 @@ var styles = [
})
}),
new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
fill: new Fill({
color: 'orange'

View File

@@ -2,7 +2,7 @@ import LineString from '../src/ol/geom/LineString.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -16,7 +16,7 @@ var stroke = new Stroke({color: 'black'});
var style = new Style({
fill: fill,
stroke: stroke,
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
fill: fill,
stroke: stroke

View File

@@ -8,7 +8,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -27,7 +27,7 @@ var vector = new VectorLayer({
color: '#ffcc33',
width: 2
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 7,
fill: new Fill({
color: '#ffcc33'

View File

@@ -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 AtlasManager from '../src/ol/style/AtlasManager.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import RegularShape from '../src/ol/style/RegularShape.js';
import Stroke from '../src/ol/style/Stroke.js';
@@ -47,7 +47,7 @@ for (i = 0; i < symbolInfo.length; ++i) {
var info = symbolInfo[i];
for (j = 0; j < radiuses.length; ++j) {
// circle symbol
symbols.push(new _ol_style_Circle_({
symbols.push(new CircleStyle({
opacity: info.opacity,
scale: info.scale,
radius: radiuses[j],

View File

@@ -5,7 +5,7 @@ import LineString from '../src/ol/geom/LineString.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_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -25,14 +25,14 @@ for (var i = 0; i < count; ++i) {
var styles = {
'10': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
fill: new Fill({color: '#666666'}),
stroke: new Stroke({color: '#bada55', width: 1})
})
}),
'20': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
fill: new Fill({color: '#666666'}),
stroke: new Stroke({color: '#bada55', width: 1})
@@ -102,7 +102,7 @@ var stroke = new Stroke({
});
var style = new Style({
stroke: stroke,
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
stroke: stroke
})

View File

@@ -16,7 +16,7 @@ import VectorSource from '../src/ol/source/Vector.js';
import Style from '../src/ol/style/Style.js';
import Stroke from '../src/ol/style/Stroke.js';
import Fill from '../src/ol/style/Fill.js';
import _ol_style_Circle_ from '../src/ol/style/Circle.js';
import CircleStyle from '../src/ol/style/Circle.js';
import Text from '../src/ol/style/Text.js';
import MousePosition from '../src/ol/control/MousePosition.js';
@@ -29,7 +29,7 @@ var nodesLayer = new VectorLayer({
source: nodes,
style: function(f) {
var style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 8,
fill: new Fill({color: 'rgba(255, 0, 0, 0.2)'}),
stroke: new Stroke({color: 'red', width: 1})

View File

@@ -5,7 +5,7 @@ import TileLayer from '../src/ol/layer/Tile.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -172,7 +172,7 @@ var vectorLines = new VectorLayer({
// Points
function pointStyleFunction(feature, resolution) {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
fill: new Fill({color: 'rgba(255, 0, 0, 0.1)'}),
stroke: new Stroke({color: 'red', width: 1})

View File

@@ -8,7 +8,7 @@ import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
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 CircleStyle from '../src/ol/style/Circle.js';
import Fill from '../src/ol/style/Fill.js';
import Stroke from '../src/ol/style/Stroke.js';
import Style from '../src/ol/style/Style.js';
@@ -66,7 +66,7 @@ var styles = {
},
'natural': {
'tree': new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
fill: new Fill({
color: 'rgba(140, 208, 95, 1.0)'

View File

@@ -13,7 +13,7 @@ import RegularShape from '../style/RegularShape.js';
* @extends {ol.style.RegularShape}
* @api
*/
var _ol_style_Circle_ = function(opt_options) {
var CircleStyle = function(opt_options) {
var options = opt_options || {};
@@ -28,7 +28,7 @@ var _ol_style_Circle_ = function(opt_options) {
};
inherits(_ol_style_Circle_, RegularShape);
inherits(CircleStyle, RegularShape);
/**
@@ -37,8 +37,8 @@ inherits(_ol_style_Circle_, RegularShape);
* @override
* @api
*/
_ol_style_Circle_.prototype.clone = function() {
var style = new _ol_style_Circle_({
CircleStyle.prototype.clone = function() {
var style = new CircleStyle({
fill: this.getFill() ? this.getFill().clone() : undefined,
stroke: this.getStroke() ? this.getStroke().clone() : undefined,
radius: this.getRadius(),
@@ -57,8 +57,8 @@ _ol_style_Circle_.prototype.clone = function() {
* @param {number} radius Circle radius.
* @api
*/
_ol_style_Circle_.prototype.setRadius = function(radius) {
CircleStyle.prototype.setRadius = function(radius) {
this.radius_ = radius;
this.render_(this.atlasManager_);
};
export default _ol_style_Circle_;
export default CircleStyle;

View File

@@ -3,7 +3,7 @@
*/
import {assert} from '../asserts.js';
import GeometryType from '../geom/GeometryType.js';
import _ol_style_Circle_ from '../style/Circle.js';
import CircleStyle from '../style/Circle.js';
import Fill from '../style/Fill.js';
import Stroke from '../style/Stroke.js';
@@ -331,7 +331,7 @@ Style.defaultFunction = function(feature, resolution) {
});
Style.default_ = [
new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: fill,
stroke: stroke,
radius: 5
@@ -390,7 +390,7 @@ Style.createDefaultEditing = function() {
styles[GeometryType.POINT] = [
new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: width * 2,
fill: new Fill({
color: blue

View File

@@ -7,7 +7,7 @@ import _ol_obj_ from '../../../../src/ol/obj.js';
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 CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
@@ -278,7 +278,7 @@ describe('ol.rendering.layer.Tile', function() {
});
onAddLayer = function(evt) {
evt.element.on('render', function(e) {
e.vectorContext.setImageStyle(new _ol_style_Circle_({
e.vectorContext.setImageStyle(new CircleStyle({
radius: 5,
snapToPixel: false,
fill: new Fill({color: 'yellow'}),

View File

@@ -8,7 +8,7 @@ import Point from '../../../../src/ol/geom/Point.js';
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 CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import Style from '../../../../src/ol/style/Style.js';
@@ -724,7 +724,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setDeclutter(true);
layer.setStyle(function(feature) {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 15,
stroke: new Stroke({
color: 'blue'
@@ -764,7 +764,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setDeclutter(true);
layer.setStyle(function(feature) {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 15,
stroke: new Stroke({
color: 'blue'
@@ -806,7 +806,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setStyle(function(feature) {
return new Style({
zIndex: feature.get('zIndex'),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 15,
stroke: new Stroke({
color: 'blue'
@@ -844,7 +844,7 @@ describe('ol.rendering.layer.Vector', function() {
layer.setDeclutter(true);
layer.setStyle(function(feature) {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5,
stroke: new Stroke({
color: 'blue'
@@ -874,7 +874,7 @@ describe('ol.rendering.layer.Vector', function() {
var point = new Feature(new Point(center));
point.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 8,
stroke: new Stroke({
color: 'blue'
@@ -917,7 +917,7 @@ describe('ol.rendering.layer.Vector', function() {
var point = new Feature(new Point(center));
point.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 8,
stroke: new Stroke({
color: 'blue'
@@ -961,7 +961,7 @@ describe('ol.rendering.layer.Vector', function() {
var point = new Feature(new Point(center));
point.setStyle(new Style({
zIndex: 2,
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 8,
stroke: new Stroke({
color: 'blue'

View File

@@ -8,7 +8,7 @@ import VectorTileLayer from '../../../../src/ol/layer/VectorTile.js';
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 CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import Text from '../../../../src/ol/style/Text.js';
@@ -105,7 +105,7 @@ describe('ol.rendering.layer.VectorTile', function() {
zIndex: 1,
source: vectorSource,
style: new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 10,
fill: new Fill({
color: 'red'
@@ -144,7 +144,7 @@ describe('ol.rendering.layer.VectorTile', function() {
var geom = feature.getGeometry();
if (geom.getType() == 'Point') {
return new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 7,
fill: new Fill({
color: 'red'

View File

@@ -4,7 +4,7 @@ import Polygon from '../../../src/ol/geom/Polygon.js';
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 CircleStyle from '../../../src/ol/style/Circle.js';
import Fill from '../../../src/ol/style/Fill.js';
import Stroke from '../../../src/ol/style/Stroke.js';
import Style from '../../../src/ol/style/Style.js';
@@ -34,7 +34,7 @@ describe('ol.render', function() {
});
var style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
fill: new Fill({
color: 'green'
}),

View File

@@ -5,7 +5,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_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Style from '../../../../src/ol/style/Style.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
@@ -49,7 +49,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-20, 18]]) : new Point([-20, 18])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
fill: new Fill({
color: '#91E339'
@@ -62,7 +62,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-10, 18]]) : new Point([-10, 18])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: '#5447E6'
@@ -75,7 +75,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[4, 18]]) : new Point([4, 18])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 6,
fill: new Fill({
color: '#92A8A6'
@@ -88,7 +88,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-20, 3]]) : new Point([-20, 3])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
fill: new Fill({
color: '#91E339'
@@ -105,7 +105,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-10, 3]]) : new Point([-10, 3])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: '#5447E6'
@@ -122,7 +122,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[4, 3]]) : new Point([4, 3])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 6,
fill: new Fill({
color: '#92A8A6'
@@ -139,7 +139,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-20, -15]]) : new Point([-20, -15])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 2,
stroke: new Stroke({
color: '#256308',
@@ -153,7 +153,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[-10, -15]]) : new Point([-10, -15])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: 'rgba(0, 0, 255, 0.3)'
@@ -170,7 +170,7 @@ describe('ol.rendering.style.Circle', function() {
geometry: multi ? new MultiPoint([[4, -15]]) : new Point([4, -15])
});
feature.setStyle(new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 6,
fill: new Fill({
color: 'rgba(235, 45, 70, 0.6)'

View File

@@ -13,7 +13,7 @@ import Polygon from '../../../../src/ol/geom/Polygon.js';
import {addProjection, addCoordinateTransforms, transform, get as getProjection} from '../../../../src/ol/proj.js';
import _ol_proj_Projection_ from '../../../../src/ol/proj/Projection.js';
import {remove as removeTransform} from '../../../../src/ol/proj/transforms.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Icon from '../../../../src/ol/style/Icon.js';
import IconAnchorUnits from '../../../../src/ol/style/IconAnchorUnits.js';
@@ -2335,7 +2335,7 @@ describe('ol.format.KML', function() {
it('skips image styles that are not icon styles', function() {
var style = new Style({
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 4,
fill: new Fill({
color: 'rgb(12, 34, 223)'

View File

@@ -8,7 +8,7 @@ import Point from '../../../../../src/ol/geom/Point.js';
import Polygon from '../../../../../src/ol/geom/Polygon.js';
import VectorContext from '../../../../../src/ol/render/VectorContext.js';
import CanvasImmediateRenderer from '../../../../../src/ol/render/canvas/Immediate.js';
import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../../src/ol/style/Circle.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import Stroke from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js';
@@ -45,7 +45,7 @@ describe('ol.render.canvas.Immediate', function() {
var fill = new Fill({});
var stroke = new Stroke({});
var text = new Text({});
var image = new _ol_style_Circle_({});
var image = new CircleStyle({});
var style = new Style({
fill: fill,
stroke: stroke,

View File

@@ -12,7 +12,7 @@ import _ol_render_webgl_ImageReplay_ from '../../../../../src/ol/render/webgl/Im
import _ol_render_webgl_Immediate_ from '../../../../../src/ol/render/webgl/Immediate.js';
import _ol_render_webgl_LineStringReplay_ from '../../../../../src/ol/render/webgl/LineStringReplay.js';
import _ol_render_webgl_PolygonReplay_ from '../../../../../src/ol/render/webgl/PolygonReplay.js';
import _ol_style_Circle_ from '../../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../../src/ol/style/Circle.js';
import Fill from '../../../../../src/ol/style/Fill.js';
import Stroke from '../../../../../src/ol/style/Stroke.js';
import Style from '../../../../../src/ol/style/Style.js';
@@ -22,7 +22,7 @@ describe('ol.render.webgl.Immediate', function() {
beforeEach(function() {
context = new _ol_render_webgl_Immediate_({}, [0, 0], 0, 0, [0, 0], [-180, -90, 180, 90], 1);
style = new Style({
image: new _ol_style_Circle_(),
image: new CircleStyle(),
fill: new Fill(),
stroke: new Stroke()
});

View File

@@ -1,5 +1,5 @@
import AtlasManager from '../../../../src/ol/style/AtlasManager.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Fill from '../../../../src/ol/style/Fill.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
@@ -9,7 +9,7 @@ describe('ol.style.Circle', function() {
describe('#constructor', function() {
it('creates a canvas if no atlas is used (no fill-style)', function() {
var style = new _ol_style_Circle_({radius: 10});
var style = new CircleStyle({radius: 10});
expect(style.getImage()).to.be.an(HTMLCanvasElement);
expect(style.getSize()).to.eql([21, 21]);
expect(style.getImageSize()).to.eql([21, 21]);
@@ -22,7 +22,7 @@ describe('ol.style.Circle', function() {
});
it('creates a canvas if no atlas is used (fill-style)', function() {
var style = new _ol_style_Circle_({
var style = new CircleStyle({
radius: 10,
fill: new Fill({
color: '#FFFF00'
@@ -41,7 +41,7 @@ describe('ol.style.Circle', function() {
it('adds itself to an atlas manager (no fill-style)', function() {
var atlasManager = new AtlasManager({initialSize: 512});
var style = new _ol_style_Circle_({radius: 10, atlasManager: atlasManager});
var style = new CircleStyle({radius: 10, atlasManager: atlasManager});
expect(style.getImage()).to.be.an(HTMLCanvasElement);
expect(style.getSize()).to.eql([21, 21]);
expect(style.getImageSize()).to.eql([512, 512]);
@@ -55,7 +55,7 @@ describe('ol.style.Circle', function() {
it('adds itself to an atlas manager (fill-style)', function() {
var atlasManager = new AtlasManager({initialSize: 512});
var style = new _ol_style_Circle_({
var style = new CircleStyle({
radius: 10,
atlasManager: atlasManager,
fill: new Fill({
@@ -77,14 +77,14 @@ describe('ol.style.Circle', function() {
describe('#clone', function() {
it('creates a new ol.style.Circle', function() {
var original = new _ol_style_Circle_();
var original = new CircleStyle();
var clone = original.clone();
expect(clone).to.be.an(_ol_style_Circle_);
expect(clone).to.be.an(CircleStyle);
expect(clone).to.not.be(original);
});
it('copies all values', function() {
var original = new _ol_style_Circle_({
var original = new CircleStyle({
fill: new Fill({
color: '#319FD3'
}),
@@ -106,7 +106,7 @@ describe('ol.style.Circle', function() {
});
it('the clone does not reference the same objects as the original', function() {
var original = new _ol_style_Circle_({
var original = new CircleStyle({
fill: new Fill({
color: '#319FD3'
}),
@@ -129,37 +129,37 @@ describe('ol.style.Circle', function() {
describe('#getChecksum', function() {
it('calculates the same hash code for default options', function() {
var style1 = new _ol_style_Circle_();
var style2 = new _ol_style_Circle_();
var style1 = new CircleStyle();
var style2 = new CircleStyle();
expect(style1.getChecksum()).to.eql(style2.getChecksum());
});
it('calculates not the same hash code (radius)', function() {
var style1 = new _ol_style_Circle_();
var style2 = new _ol_style_Circle_({
var style1 = new CircleStyle();
var style2 = new CircleStyle({
radius: 5
});
expect(style1.getChecksum()).to.not.eql(style2.getChecksum());
});
it('calculates the same hash code (radius)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5
});
expect(style1.getChecksum()).to.eql(style2.getChecksum());
});
it('calculates not the same hash code (color)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
stroke: new Stroke({
color: '#319FD3'
@@ -169,7 +169,7 @@ describe('ol.style.Circle', function() {
});
it('calculates the same hash code (everything set)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -183,7 +183,7 @@ describe('ol.style.Circle', function() {
width: 2
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -201,7 +201,7 @@ describe('ol.style.Circle', function() {
});
it('calculates not the same hash code (stroke width differs)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -215,7 +215,7 @@ describe('ol.style.Circle', function() {
width: 3
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -233,7 +233,7 @@ describe('ol.style.Circle', function() {
});
it('invalidates a cached checksum if values change (fill)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -242,7 +242,7 @@ describe('ol.style.Circle', function() {
color: '#319FD3'
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -258,7 +258,7 @@ describe('ol.style.Circle', function() {
});
it('invalidates a cached checksum if values change (stroke)', function() {
var style1 = new _ol_style_Circle_({
var style1 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -267,7 +267,7 @@ describe('ol.style.Circle', function() {
color: '#319FD3'
})
});
var style2 = new _ol_style_Circle_({
var style2 = new CircleStyle({
radius: 5,
fill: new Fill({
color: '#319FD3'
@@ -286,7 +286,7 @@ describe('ol.style.Circle', function() {
describe('#setRadius', function() {
it('changes the circle radius', function() {
var style = new _ol_style_Circle_({
var style = new CircleStyle({
radius: 10,
fill: new Fill({
color: '#FFFF00'

View File

@@ -2,7 +2,7 @@ import Feature from '../../../../src/ol/Feature.js';
import Point from '../../../../src/ol/geom/Point.js';
import Style from '../../../../src/ol/style/Style.js';
import Fill from '../../../../src/ol/style/Fill.js';
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.js';
import CircleStyle from '../../../../src/ol/style/Circle.js';
import Stroke from '../../../../src/ol/style/Stroke.js';
import Text from '../../../../src/ol/style/Text.js';
@@ -29,7 +29,7 @@ describe('ol.style.Style', function() {
})
});
var testImage = new _ol_style_Circle_({
var testImage = new CircleStyle({
radius: 5
});
@@ -48,7 +48,7 @@ describe('ol.style.Style', function() {
fill: new Fill({
color: '#319FD3'
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5
}),
stroke: new Stroke({
@@ -74,7 +74,7 @@ describe('ol.style.Style', function() {
fill: new Fill({
color: '#319FD3'
}),
image: new _ol_style_Circle_({
image: new CircleStyle({
radius: 5
}),
stroke: new Stroke({