Commit Graph

61 Commits

Author SHA1 Message Date
Andreas Hocevar
ac50cc3460 New eslint config with no-multi-assign 2019-11-02 15:20:21 +01:00
Andreas Hocevar
442213f85b Store correct font value 2019-11-01 22:06:00 +01:00
Frederic Junod
0e402073da Add more typecast for typescript 2019-09-27 13:11:30 +02:00
ahocevar
bd3f35eef0 Declutter multi geometries per geometry instead of per feature 2019-08-17 23:55:20 +02:00
Andreas Hocevar
ff063caa4e Merge pull request #9755 from ahocevar/font-loading
Font loading improvements
2019-07-15 12:21:28 +02:00
Frederic Junod
ad51c7c08f Use CanvasLineCap type instead of string 2019-07-05 11:11:35 +02:00
Frederic Junod
7a8a0c18ae Use CanvasLineJoin type instead of string 2019-07-05 11:07:10 +02:00
ahocevar
4b48997a0b Check font style and weight in addition to family 2019-07-04 16:12:35 +02:00
ahocevar
ab2d97d49b Don't give up too early when waiting for fonts 2019-07-04 16:11:39 +02:00
ahocevar
5616c535b0 Clean up properly when clearing label cache 2019-07-04 16:10:28 +02:00
ahocevar
b4306da7bb Fix font comparison, less context.font operations 2019-07-04 16:06:13 +02:00
ahocevar
c56ad4363d Canvas opacity instead of css 2019-05-22 16:47:22 +02:00
ahocevar
b06c84cef9 More efficient default stroke style 2019-03-19 13:58:20 +01:00
ahocevar
b33ceaa400 More efficient default fill color 2019-03-19 13:57:10 +01:00
ahocevar
4a7b3cde56 Take line-height into account when measuring text height 2019-03-09 08:25:09 +01:00
ahocevar
592b6cf362 Keep track of used labels 2019-01-23 21:52:22 +01:00
ahocevar
e37734826c Release canvas memory faster 2019-01-21 23:04:31 +01:00
Tim Schaub
8b50c3c6cb Pass along the ability to measure and cache text width 2018-11-19 15:34:48 -07:00
ahocevar
3d203f990e Move measureTextWidths to render/canvas 2018-11-15 15:20:41 +01:00
Frederic Junod
9c52e0d6d9 Remove extra imports in jsdoc
The symbols are already imported (es6 import)
2018-09-19 14:52:58 +02:00
ahocevar
79674363e6 Fix imports in TextState 2018-09-13 11:42:59 +02:00
Frederic Junod
c8747d87a4 Add missing properties in TextState typedef 2018-09-06 09:30:28 +02:00
Tim Schaub
ccfacc5ee6 Transformed types
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e):

    jscodeshift --transform ts.js src
2018-09-05 08:05:29 -06:00
ahocevar
62188502e9 Check font availability in 3 different weight ranges 2018-08-02 18:57:26 +02:00
Tim Schaub
2eb07aa081 Use Template<Foo> instead of Template.<Foo> 2018-07-25 18:37:08 -07:00
Tim Schaub
affbf59b77 Use Object<Foo, Bar> instead of Object.<Foo, Bar> 2018-07-25 18:33:49 -07:00
Tim Schaub
d12ef20b12 Use Array<Foo> instead of Array.<Foo> 2018-07-25 18:32:43 -07:00
Tim Schaub
8e7c88d9a5 Updated type annotations 2018-05-07 15:50:56 -06:00
Frederic Junod
76769f9901 Module type for ol.struct.* 2018-04-26 15:16:21 +02:00
Frederic Junod
975d3f31d6 Fix FillState typedef definition 2018-04-19 17:41:08 +02:00
Tim Schaub
1c792f2d9b Type is {string} instead of string{} 2018-04-19 17:41:08 +02:00
Michael Kuenzli
3b983564b3 Move ol.DeclutterGroup to ol/render/canvas 2018-04-19 17:41:08 +02:00
Michael Kuenzli
b740630e89 Move ol.CanvasTextState to ol/render/canvas 2018-04-19 17:41:08 +02:00
Michael Kuenzli
6096f84be2 Move ol.CanvasStrokeState to ol/render/canvas 2018-04-19 17:41:08 +02:00
Michael Kuenzli
113785f048 Move ol.CanvasFillStrokeState to ol/render/canvas 2018-04-19 17:41:08 +02:00
Michael Kuenzli
4f74bcaa31 Move ol.CanvasFillState to ol/render/canvas 2018-04-19 17:41:08 +02:00
Frederic Junod
3edbbf0b46 Module type for ol.Color 2018-03-19 09:25:45 +01:00
Andreas Hocevar
95d6251dbb Get rid of olx.js and typedef.js typedefs for ol 2018-03-08 18:57:24 +01:00
Guillaume Beraudo
cfa9718df9 Remove window prefix
The prefix is unnecessary and prevent usage in web workers.
2018-02-28 23:22:18 +01:00
Andreas Hocevar
445c49c1eb Add a unicode symbol for symbol font detection 2018-02-27 13:22:35 +01:00
Andreas Hocevar
fff957a199 Allow setting the label cache size 2018-02-16 11:36:58 +01:00
Marc Jansen
183b8e29c4 Named exports from ol/transform 2018-02-15 17:55:54 +01:00
Tim Schaub
0948d4002f Named exports from ol/render/canvas 2018-02-14 09:43:20 -07:00
Frederic Junod
31e30d28b7 Named exports from ol/obj 2018-01-16 14:14:17 +01:00
Tim Schaub
ad62739a6e Use blocked scoped variables
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00
Andreas Hocevar
e2af5f6be3 Check fonts against two reference fonts
In rare cases, the previous font check returned false negatives when
checking against monospace only. By checking against another font, this
can be avoided.
2018-01-03 10:34:18 +01:00
Marc Jansen
a7c5897bdb Named exports from ol/css module 2017-12-19 11:38:56 +01:00
Frederic Junod
e887b5012b Rename _ol_structs_LRUCache_ to LRUCache 2017-12-17 09:00:48 +01:00
Frederic Junod
f6627c4d4e Named exports from ol/dom 2017-12-14 12:27:09 +01:00
Tim Schaub
7f47883c48 Transformed 2017-12-12 06:53:18 -07:00