Add a rendering test case for text-align css property
This commit is contained in:
BIN
rendering/cases/map-text-align/expected.png
Normal file
BIN
rendering/cases/map-text-align/expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 112 KiB |
26
rendering/cases/map-text-align/index.html
Normal file
26
rendering/cases/map-text-align/index.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
.ol-control {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script src="main.js"></script>
|
||||
</body>
|
||||
</script>
|
||||
</html>
|
||||
24
rendering/cases/map-text-align/main.js
Normal file
24
rendering/cases/map-text-align/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import Map from '../../../src/ol/Map.js';
|
||||
import View from '../../../src/ol/View.js';
|
||||
import TileLayer from '../../../src/ol/layer/Tile.js';
|
||||
import {fromLonLat} from '../../../src/ol/proj.js';
|
||||
import XYZ from '../../../src/ol/source/XYZ.js';
|
||||
|
||||
|
||||
new Map({
|
||||
layers: [
|
||||
new TileLayer({
|
||||
source: new XYZ({
|
||||
url: '/data/tiles/satellite/{z}/{x}/{y}.jpg'
|
||||
})
|
||||
})
|
||||
],
|
||||
target: 'map',
|
||||
view: new View({
|
||||
rotation: Math.PI / 3,
|
||||
center: fromLonLat([8.6, 50.1]),
|
||||
zoom: 3
|
||||
})
|
||||
});
|
||||
|
||||
render();
|
||||
Reference in New Issue
Block a user