Rename _ol_style_Text_ to Text
This commit is contained in:
@@ -12,7 +12,7 @@ import _ol_style_Circle_ 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';
|
||||
import _ol_style_Text_ from '../../../../src/ol/style/Text.js';
|
||||
import Text from '../../../../src/ol/style/Text.js';
|
||||
|
||||
|
||||
describe('ol.rendering.layer.Vector', function() {
|
||||
@@ -606,7 +606,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
layer.setDeclutter(true);
|
||||
layer.setStyle(function(feature) {
|
||||
return new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: feature.get('text'),
|
||||
font: '12px sans-serif'
|
||||
})
|
||||
@@ -647,7 +647,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
layer.setDeclutter(true);
|
||||
layer.setStyle(function(feature) {
|
||||
return new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: feature.get('text'),
|
||||
font: '12px sans-serif'
|
||||
})
|
||||
@@ -690,7 +690,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
layer.setStyle(function(feature) {
|
||||
return new Style({
|
||||
zIndex: feature.get('zIndex'),
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: feature.get('text'),
|
||||
font: '12px sans-serif'
|
||||
})
|
||||
@@ -850,7 +850,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
color: 'blue'
|
||||
})
|
||||
}),
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: feature.get('text'),
|
||||
font: '12px sans-serif',
|
||||
textBaseline: 'bottom',
|
||||
@@ -890,7 +890,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
color: '#CCC',
|
||||
width: 12
|
||||
}),
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
placement: 'line',
|
||||
text: 'east-west',
|
||||
font: '12px sans-serif'
|
||||
@@ -933,7 +933,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
color: '#CCC',
|
||||
width: 12
|
||||
}),
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
placement: 'line',
|
||||
text: 'east-west',
|
||||
font: '12px sans-serif'
|
||||
@@ -978,7 +978,7 @@ describe('ol.rendering.layer.Vector', function() {
|
||||
color: '#CCC',
|
||||
width: 12
|
||||
}),
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
placement: 'line',
|
||||
text: 'east-west',
|
||||
font: '12px sans-serif'
|
||||
|
||||
@@ -11,7 +11,7 @@ import VectorTileSource from '../../../../src/ol/source/VectorTile.js';
|
||||
import _ol_style_Circle_ from '../../../../src/ol/style/Circle.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 Text from '../../../../src/ol/style/Text.js';
|
||||
import _ol_tilegrid_ from '../../../../src/ol/tilegrid.js';
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ describe('ol.rendering.layer.VectorTile', function() {
|
||||
color: 'red'
|
||||
})
|
||||
}),
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: feature.get('name_en'),
|
||||
font: '12px sans-serif',
|
||||
textBaseline: 'bottom',
|
||||
|
||||
@@ -8,7 +8,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_Text_ from '../../../../src/ol/style/Text.js';
|
||||
import Text from '../../../../src/ol/style/Text.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';
|
||||
@@ -53,7 +53,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
geometry: new Point([-20, 18])
|
||||
});
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
scale: scale,
|
||||
text: 'hello',
|
||||
font: '10px sans-serif'
|
||||
@@ -65,7 +65,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
geometry: new Point([-10, 0])
|
||||
});
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
scale: scale,
|
||||
text: 'hello',
|
||||
fill: new Fill({
|
||||
@@ -84,7 +84,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
geometry: new Point([20, 10])
|
||||
});
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
scale: scale,
|
||||
rotateWithView: true,
|
||||
text: 'hello',
|
||||
@@ -111,7 +111,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
stroke: new Stroke({
|
||||
color: 'red'
|
||||
}),
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world',
|
||||
font: 'bold 14px sans-serif',
|
||||
scale: scale || 1,
|
||||
@@ -177,7 +177,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
var feature;
|
||||
feature = new Feature(new Point([25, 0]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world\nleft',
|
||||
font: 'bold 14px sans-serif',
|
||||
textAlign: 'left'
|
||||
@@ -186,7 +186,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
feature = new Feature(new Point([-25, 0]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world\nright',
|
||||
font: 'bold 14px sans-serif',
|
||||
textAlign: 'right'
|
||||
@@ -195,7 +195,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
feature = new Feature(new Point([0, 25]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world\nbottom',
|
||||
font: 'bold 14px sans-serif',
|
||||
textBaseline: 'bottom'
|
||||
@@ -204,7 +204,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
feature = new Feature(new Point([0, -25]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'top\nHello world',
|
||||
font: 'bold 14px sans-serif',
|
||||
textBaseline: 'top'
|
||||
@@ -219,7 +219,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
var feature;
|
||||
feature = new Feature(new Point([0, 0]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world\nleft',
|
||||
font: 'bold 14px sans-serif',
|
||||
textAlign: 'left',
|
||||
@@ -229,7 +229,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
feature = new Feature(new Point([0, 0]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world\nright',
|
||||
font: 'bold 14px sans-serif',
|
||||
textAlign: 'right',
|
||||
@@ -239,7 +239,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
feature = new Feature(new Point([0, 0]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world\nbottom',
|
||||
font: 'bold 14px sans-serif',
|
||||
textBaseline: 'bottom',
|
||||
@@ -249,7 +249,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
vectorSource.addFeature(feature);
|
||||
feature = new Feature(new Point([0, 0]));
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'top\nHello world',
|
||||
font: 'bold 14px sans-serif',
|
||||
textBaseline: 'top',
|
||||
@@ -274,7 +274,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
geom.appendLineString(line);
|
||||
var feature = new Feature(geom);
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world',
|
||||
placement: 'line',
|
||||
font: 'bold 30px sans-serif'
|
||||
@@ -291,7 +291,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
geom.setFlatCoordinates('XY', polygon, [polygon.length]);
|
||||
var feature = new Feature(geom);
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world',
|
||||
font: 'bold 24px sans-serif',
|
||||
placement: 'line',
|
||||
@@ -317,7 +317,7 @@ describe('ol.rendering.style.Text', function() {
|
||||
multiPolygon.appendPolygon(geom);
|
||||
var feature = new Feature(multiPolygon);
|
||||
feature.setStyle(new Style({
|
||||
text: new _ol_style_Text_({
|
||||
text: new Text({
|
||||
text: 'Hello world',
|
||||
font: 'bold 24px sans-serif',
|
||||
placement: 'line',
|
||||
|
||||
Reference in New Issue
Block a user