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