Andreas Hocevar
c9ebf79df5
Add types and comments to make combined image+text decluttering clearer
2020-10-05 19:17:22 +02:00
Andreas Hocevar
8e862766fc
New decluttering implementation
2020-09-27 21:13:26 +02:00
Andreas Hocevar
7a5e0db59f
Remove decluttering for a fresh start
2020-09-18 23:31:20 +02:00
mike-000
cf0e650435
allow scale to be two dimensional
...
add getScaleArray() method
test two dimension scale icons
test two dimension scale text
add example of icon and label scaling
use smaller icon and larger interval
test two dimensional scale icons
test two dimensional scale icons
2020-05-20 09:54:47 +01:00
Tim Schaub
054af09032
Make code prettier
...
This updates ESLint and our shared eslint-config-openlayers to use Prettier. Most formatting changes were automatically applied with this:
npm run lint -- --fix
A few manual changes were required:
* In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
* In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason. While editing this, I reworked `ExampleBuilder` to be a class.
* In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00
Andreas Hocevar
3f7f999db0
Avoid try/catch, DOM and workers
2020-03-23 12:46:24 +01:00
Andreas Hocevar
6dcc54bfb8
'action' instead of 'type' as message identifier
2020-03-23 12:46:24 +01:00
Andreas Hocevar
06f6ba13c8
Make font loading work in workers
2020-03-23 12:46:22 +01:00
Andreas Hocevar
56edbb2d73
Make createTransformToString a standalone function
2020-03-23 12:46:21 +01:00
Maximilian Krög
ab9d7cdc70
Draw image with configured opacity
2020-02-18 14:09:36 +01:00
Andreas Hocevar
262373a4b5
Remove circular dependency
2020-02-12 20:31:18 +01:00
Andreas Hocevar
7266f37f85
Remove unused export and variable
2020-01-30 14:56:11 +01:00
Andreas Hocevar
542b77eef8
Save and restore before rendering labels
2020-01-30 09:14:03 +01:00
Andreas Hocevar
fd935bae53
Remove label cache, render text directly to target canvas
2020-01-13 22:12:53 +01:00
Andreas Hocevar
48ec398037
Do not bypass measureTextWidth
2019-11-05 21:08:48 +01:00
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