Rename _ol_style_Fill_ to Fill
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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_({
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user