Don't give up too early when waiting for fonts
This commit is contained in:
@@ -196,7 +196,7 @@ export const textHeights = {};
|
|||||||
* @param {string} fontSpec CSS font spec.
|
* @param {string} fontSpec CSS font spec.
|
||||||
*/
|
*/
|
||||||
export const checkFont = (function() {
|
export const checkFont = (function() {
|
||||||
const retries = 60;
|
const retries = 100;
|
||||||
const checked = checkedFonts;
|
const checked = checkedFonts;
|
||||||
const size = '32px ';
|
const size = '32px ';
|
||||||
const referenceFonts = ['monospace', 'serif'];
|
const referenceFonts = ['monospace', 'serif'];
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ describe('ol.render.canvas', function() {
|
|||||||
render.measureTextHeight('12px sans-serif');
|
render.measureTextHeight('12px sans-serif');
|
||||||
});
|
});
|
||||||
|
|
||||||
const retries = 60;
|
const retries = 100;
|
||||||
|
|
||||||
it('does not clear label cache and measurements for unavailable fonts', function(done) {
|
it('does not clear label cache and measurements for unavailable fonts', function(done) {
|
||||||
this.timeout(3000);
|
this.timeout(4000);
|
||||||
const spy = sinon.spy();
|
const spy = sinon.spy();
|
||||||
listen(render.labelCache, 'clear', spy);
|
listen(render.labelCache, 'clear', spy);
|
||||||
const interval = setInterval(function() {
|
const interval = setInterval(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user