Skip to content

Commit b45bec4

Browse files
committed
Website updates
1 parent 28861c9 commit b45bec4

18 files changed

+134
-90
lines changed

dist/en/main/apidoc/module-ol_Map-Map.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4997,7 +4997,7 @@ <h4 class="name">
49974997

49984998
<div class="tag-source">
49994999
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
5000-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1499">line 1499</a>
5000+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1502">line 1502</a>
50015001
</div>
50025002

50035003
</div>
@@ -5133,7 +5133,7 @@ <h4 class="name">
51335133

51345134
<div class="tag-source">
51355135
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
5136-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1510">line 1510</a>
5136+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1513">line 1513</a>
51375137
</div>
51385138

51395139
</div>
@@ -5269,7 +5269,7 @@ <h4 class="name">
52695269

52705270
<div class="tag-source">
52715271
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
5272-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1521">line 1521</a>
5272+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1524">line 1524</a>
52735273
</div>
52745274

52755275
</div>
@@ -5405,7 +5405,7 @@ <h4 class="name">
54055405

54065406
<div class="tag-source">
54075407
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
5408-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1541">line 1541</a>
5408+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1544">line 1544</a>
54095409
</div>
54105410

54115411
</div>
@@ -5541,7 +5541,7 @@ <h4 class="name">
55415541

55425542
<div class="tag-source">
55435543
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
5544-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1486">line 1486</a>
5544+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1489">line 1489</a>
55455545
</div>
55465546

55475547
</div>
@@ -5881,7 +5881,7 @@ <h4 class="name">
58815881

58825882
<div class="tag-source">
58835883
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
5884-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1663">line 1663</a>
5884+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1666">line 1666</a>
58855885
</div>
58865886

58875887
</div>
@@ -6290,7 +6290,7 @@ <h4 class="name">
62906290

62916291
<div class="tag-source">
62926292
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
6293-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1677">line 1677</a>
6293+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1680">line 1680</a>
62946294
</div>
62956295

62966296
</div>
@@ -6419,7 +6419,7 @@ <h4 class="name">
64196419

64206420
<div class="tag-source">
64216421
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
6422-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1691">line 1691</a>
6422+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1694">line 1694</a>
64236423
</div>
64246424

64256425
</div>
@@ -6552,7 +6552,7 @@ <h4 class="name">
65526552

65536553
<div class="tag-source">
65546554
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
6555-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1704">line 1704</a>
6555+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1707">line 1707</a>
65566556
</div>
65576557

65586558
</div>
@@ -6996,7 +6996,7 @@ <h4 class="name">
69966996

69976997
<div class="tag-source">
69986998
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js">Map.js</a>,
6999-
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1722">line 1722</a>
6999+
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/Map.js#L1725">line 1725</a>
70007000
</div>
70017001

70027002
</div>

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/offscreen-canvas.worker.worker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/offscreen-canvas.worker.worker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/Map.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/Map.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,10 @@ class Map extends BaseObject {
14701470
* Redraws all text after new fonts have loaded
14711471
*/
14721472
redrawText() {
1473-
const layerStates = this.getLayerGroup().getLayerStatesArray();
1473+
if (!this.frameState_) {
1474+
return;
1475+
}
1476+
const layerStates = this.frameState_.layerStatesArray;
14741477
for (let i = 0, ii = layerStates.length; i < ii; ++i) {
14751478
const layer = layerStates[i].layer;
14761479
if (layer.hasRenderer()) {

dist/en/main/ol/css.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export const CLASS_CONTROL: string;
5454
* @type {string}
5555
*/
5656
export const CLASS_COLLAPSED: string;
57+
/** @type {Object<string|number, number>} */
58+
export const fontWeights: any;
5759
export function getFontParameters(fontSpec: string): FontParameters | null;
5860
export type FontParameters = {
5961
/**

dist/en/main/ol/css.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/css.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ const fontRegExMatchIndex = [
8888
'family',
8989
];
9090

91+
/** @type {Object<string|number, number>} */
92+
export const fontWeights = {
93+
normal: 400,
94+
bold: 700,
95+
};
96+
9197
/**
9298
* Get the list of font families from a font spec. Note that this doesn't work
9399
* for font families that have commas in them.
@@ -103,15 +109,21 @@ export const getFontParameters = function (fontSpec) {
103109
lineHeight: 'normal',
104110
size: '1.2em',
105111
style: 'normal',
106-
weight: 'normal',
112+
weight: '400',
107113
variant: 'normal',
108114
});
109115
for (let i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {
110116
const value = match[i + 1];
111117
if (value !== undefined) {
112-
style[fontRegExMatchIndex[i]] = value;
118+
style[fontRegExMatchIndex[i]] =
119+
typeof value === 'string' ? value.trim() : value;
113120
}
114121
}
115-
style.families = style.family.split(/,\s?/);
122+
if (isNaN(Number(style.weight)) && style.weight in fontWeights) {
123+
style.weight = fontWeights[style.weight];
124+
}
125+
style.families = style.family
126+
.split(/,\s?/)
127+
.map((f) => f.trim().replace(/^['"]|['"]$/g, ''));
116128
return style;
117129
};

0 commit comments

Comments
 (0)