Rename _ol_style_Stroke_ to Stroke

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

View File

@@ -11,7 +11,7 @@ import {clamp} from './math.js';
import {get as getProjection, equivalent as equivalentProjection, getTransform, transformExtent} from './proj.js';
import RenderEventType from './render/EventType.js';
import Fill from './style/Fill.js';
import _ol_style_Stroke_ from './style/Stroke.js';
import Stroke from './style/Stroke.js';
import _ol_style_Text_ from './style/Text.js';
@@ -20,7 +20,7 @@ import _ol_style_Text_ from './style/Text.js';
* @private
* @const
*/
var DEFAULT_STROKE_STYLE = new _ol_style_Stroke_({
var DEFAULT_STROKE_STYLE = new Stroke({
color: 'rgba(0,0,0,0.2)'
});
@@ -289,7 +289,7 @@ var Graticule = function(opt_options) {
fill: new Fill({
color: 'rgba(0,0,0,1)'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'rgba(255,255,255,1)',
width: 3
})
@@ -306,7 +306,7 @@ var Graticule = function(opt_options) {
fill: new Fill({
color: 'rgba(0,0,0,1)'
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: 'rgba(255,255,255,1)',
width: 3
})

View File

@@ -24,7 +24,7 @@ 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';
import _ol_style_Stroke_ from '../style/Stroke.js';
import Stroke from '../style/Stroke.js';
import Style from '../style/Style.js';
import _ol_style_Text_ from '../style/Text.js';
import _ol_xml_ from '../xml.js';
@@ -221,7 +221,7 @@ KML.createStyleDefaults_ = function() {
* @type {ol.style.Stroke}
* @private
*/
KML.DEFAULT_STROKE_STYLE_ = new _ol_style_Stroke_({
KML.DEFAULT_STROKE_STYLE_ = new Stroke({
color: KML.DEFAULT_COLOR_,
width: 1
});
@@ -231,7 +231,7 @@ KML.createStyleDefaults_ = function() {
* @type {ol.style.Stroke}
* @private
*/
KML.DEFAULT_TEXT_STROKE_STYLE_ = new _ol_style_Stroke_({
KML.DEFAULT_TEXT_STROKE_STYLE_ = new Stroke({
color: [51, 51, 51, 1],
width: 2
});
@@ -694,7 +694,7 @@ KML.LineStyleParser_ = function(node, objectStack) {
return;
}
var styleObject = objectStack[objectStack.length - 1];
var strokeStyle = new _ol_style_Stroke_({
var strokeStyle = new Stroke({
color: /** @type {ol.Color} */
('color' in object ? object['color'] : KML.DEFAULT_COLOR_),
width: /** @type {number} */ ('width' in object ? object['width'] : 1)

View File

@@ -14,7 +14,7 @@ import _ol_render_webgl_polygonreplay_defaultshader_Locations_ from '../webgl/po
import _ol_render_webgl_LineStringReplay_ from '../webgl/LineStringReplay.js';
import _ol_render_webgl_Replay_ from '../webgl/Replay.js';
import _ol_render_webgl_ from '../webgl.js';
import _ol_style_Stroke_ from '../../style/Stroke.js';
import Stroke from '../../style/Stroke.js';
import LinkedList from '../../structs/LinkedList.js';
import RBush from '../../structs/RBush.js';
import _ol_webgl_ from '../../webgl.js';
@@ -1063,7 +1063,7 @@ _ol_render_webgl_PolygonReplay_.prototype.setFillStrokeStyle = function(fillStyl
if (strokeStyle) {
this.lineStringReplay.setFillStrokeStyle(null, strokeStyle);
} else {
var nullStrokeStyle = new _ol_style_Stroke_({
var nullStrokeStyle = new Stroke({
color: [0, 0, 0, 0],
lineWidth: 0
});

View File

@@ -14,7 +14,7 @@ import {getUid} from '../index.js';
* @param {olx.style.StrokeOptions=} opt_options Options.
* @api
*/
var _ol_style_Stroke_ = function(opt_options) {
var Stroke = function(opt_options) {
var options = opt_options || {};
@@ -73,9 +73,9 @@ var _ol_style_Stroke_ = function(opt_options) {
* @return {ol.style.Stroke} The cloned style.
* @api
*/
_ol_style_Stroke_.prototype.clone = function() {
Stroke.prototype.clone = function() {
var color = this.getColor();
return new _ol_style_Stroke_({
return new Stroke({
color: (color && color.slice) ? color.slice() : color || undefined,
lineCap: this.getLineCap(),
lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,
@@ -92,7 +92,7 @@ _ol_style_Stroke_.prototype.clone = function() {
* @return {ol.Color|ol.ColorLike} Color.
* @api
*/
_ol_style_Stroke_.prototype.getColor = function() {
Stroke.prototype.getColor = function() {
return this.color_;
};
@@ -102,7 +102,7 @@ _ol_style_Stroke_.prototype.getColor = function() {
* @return {string|undefined} Line cap.
* @api
*/
_ol_style_Stroke_.prototype.getLineCap = function() {
Stroke.prototype.getLineCap = function() {
return this.lineCap_;
};
@@ -112,7 +112,7 @@ _ol_style_Stroke_.prototype.getLineCap = function() {
* @return {Array.<number>} Line dash.
* @api
*/
_ol_style_Stroke_.prototype.getLineDash = function() {
Stroke.prototype.getLineDash = function() {
return this.lineDash_;
};
@@ -122,7 +122,7 @@ _ol_style_Stroke_.prototype.getLineDash = function() {
* @return {number|undefined} Line dash offset.
* @api
*/
_ol_style_Stroke_.prototype.getLineDashOffset = function() {
Stroke.prototype.getLineDashOffset = function() {
return this.lineDashOffset_;
};
@@ -132,7 +132,7 @@ _ol_style_Stroke_.prototype.getLineDashOffset = function() {
* @return {string|undefined} Line join.
* @api
*/
_ol_style_Stroke_.prototype.getLineJoin = function() {
Stroke.prototype.getLineJoin = function() {
return this.lineJoin_;
};
@@ -142,7 +142,7 @@ _ol_style_Stroke_.prototype.getLineJoin = function() {
* @return {number|undefined} Miter limit.
* @api
*/
_ol_style_Stroke_.prototype.getMiterLimit = function() {
Stroke.prototype.getMiterLimit = function() {
return this.miterLimit_;
};
@@ -152,7 +152,7 @@ _ol_style_Stroke_.prototype.getMiterLimit = function() {
* @return {number|undefined} Width.
* @api
*/
_ol_style_Stroke_.prototype.getWidth = function() {
Stroke.prototype.getWidth = function() {
return this.width_;
};
@@ -163,7 +163,7 @@ _ol_style_Stroke_.prototype.getWidth = function() {
* @param {ol.Color|ol.ColorLike} color Color.
* @api
*/
_ol_style_Stroke_.prototype.setColor = function(color) {
Stroke.prototype.setColor = function(color) {
this.color_ = color;
this.checksum_ = undefined;
};
@@ -175,7 +175,7 @@ _ol_style_Stroke_.prototype.setColor = function(color) {
* @param {string|undefined} lineCap Line cap.
* @api
*/
_ol_style_Stroke_.prototype.setLineCap = function(lineCap) {
Stroke.prototype.setLineCap = function(lineCap) {
this.lineCap_ = lineCap;
this.checksum_ = undefined;
};
@@ -193,7 +193,7 @@ _ol_style_Stroke_.prototype.setLineCap = function(lineCap) {
* @param {Array.<number>} lineDash Line dash.
* @api
*/
_ol_style_Stroke_.prototype.setLineDash = function(lineDash) {
Stroke.prototype.setLineDash = function(lineDash) {
this.lineDash_ = lineDash;
this.checksum_ = undefined;
};
@@ -205,7 +205,7 @@ _ol_style_Stroke_.prototype.setLineDash = function(lineDash) {
* @param {number|undefined} lineDashOffset Line dash offset.
* @api
*/
_ol_style_Stroke_.prototype.setLineDashOffset = function(lineDashOffset) {
Stroke.prototype.setLineDashOffset = function(lineDashOffset) {
this.lineDashOffset_ = lineDashOffset;
this.checksum_ = undefined;
};
@@ -217,7 +217,7 @@ _ol_style_Stroke_.prototype.setLineDashOffset = function(lineDashOffset) {
* @param {string|undefined} lineJoin Line join.
* @api
*/
_ol_style_Stroke_.prototype.setLineJoin = function(lineJoin) {
Stroke.prototype.setLineJoin = function(lineJoin) {
this.lineJoin_ = lineJoin;
this.checksum_ = undefined;
};
@@ -229,7 +229,7 @@ _ol_style_Stroke_.prototype.setLineJoin = function(lineJoin) {
* @param {number|undefined} miterLimit Miter limit.
* @api
*/
_ol_style_Stroke_.prototype.setMiterLimit = function(miterLimit) {
Stroke.prototype.setMiterLimit = function(miterLimit) {
this.miterLimit_ = miterLimit;
this.checksum_ = undefined;
};
@@ -241,7 +241,7 @@ _ol_style_Stroke_.prototype.setMiterLimit = function(miterLimit) {
* @param {number|undefined} width Width.
* @api
*/
_ol_style_Stroke_.prototype.setWidth = function(width) {
Stroke.prototype.setWidth = function(width) {
this.width_ = width;
this.checksum_ = undefined;
};
@@ -250,7 +250,7 @@ _ol_style_Stroke_.prototype.setWidth = function(width) {
/**
* @return {string} The checksum.
*/
_ol_style_Stroke_.prototype.getChecksum = function() {
Stroke.prototype.getChecksum = function() {
if (this.checksum_ === undefined) {
this.checksum_ = 's';
if (this.color_) {
@@ -279,4 +279,4 @@ _ol_style_Stroke_.prototype.getChecksum = function() {
return this.checksum_;
};
export default _ol_style_Stroke_;
export default Stroke;

View File

@@ -5,7 +5,7 @@ import {assert} from '../asserts.js';
import GeometryType from '../geom/GeometryType.js';
import _ol_style_Circle_ from '../style/Circle.js';
import Fill from '../style/Fill.js';
import _ol_style_Stroke_ from '../style/Stroke.js';
import Stroke from '../style/Stroke.js';
/**
* @classdesc
@@ -325,7 +325,7 @@ Style.defaultFunction = function(feature, resolution) {
var fill = new Fill({
color: 'rgba(255,255,255,0.4)'
});
var stroke = new _ol_style_Stroke_({
var stroke = new Stroke({
color: '#3399CC',
width: 1.25
});
@@ -367,13 +367,13 @@ Style.createDefaultEditing = function() {
styles[GeometryType.LINE_STRING] = [
new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: white,
width: width + 2
})
}),
new Style({
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: blue,
width: width
})
@@ -395,7 +395,7 @@ Style.createDefaultEditing = function() {
fill: new Fill({
color: blue
}),
stroke: new _ol_style_Stroke_({
stroke: new Stroke({
color: white,
width: width / 2
})