Commit Graph

73 Commits

Author SHA1 Message Date
Andreas Hocevar
58806aaec1 No context sharing when layer opacity is set 2021-11-05 15:00:56 +01:00
mike-000
655a49de7b Reuse temporary canvas in getDataAtPixel() 2021-11-04 13:09:16 +00:00
Andreas Hocevar
46b21c2588 Do not do any canvas work when there are no features to render 2021-09-21 11:21:01 +00:00
Andreas Hocevar
2f5e6906b9 Fix opacity handling for tile and vector layers 2021-09-16 08:49:32 +02:00
Bryant Evans
709e933799 Forward LayerType type parameter to LayerRenderer 2021-07-12 09:00:20 +00:00
Maximilian Krög
83226cc79a Fix layer render extent when it is not at all in view 2021-07-11 18:27:48 +02:00
Mathias Boeck
a92bc2755d Check if render pixel is in the layer extent 2020-11-16 14:13:21 +01:00
Andreas Hocevar
8efb1eea43 Reuse empty canvas 2020-07-21 22:35:48 +02:00
Kamil
a151d1b7a5 #11235
GetDataAtPixel performance improvement
2020-07-05 17:52:51 +02:00
Andreas Hocevar
bcc94baf22 Fix layer renderer scope issues 2020-04-15 10:53:26 +02: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
56edbb2d73 Make createTransformToString a standalone function 2020-03-23 12:46:21 +01:00
Andreas Hocevar
8b76f52652 Make createTransformString work in non-window context 2020-03-23 12:46:20 +01:00
Andreas Hocevar
3de05c249b Fix container transform comparison 2019-10-31 20:29:20 +01:00
Andreas Hocevar
54884314ee Merge pull request #10094 from ahocevar/immediate-hitdetection
New Layer#getFeatures method with fast hit detection
2019-10-14 22:21:08 +02:00
Andreas Hocevar
315695eeb8 New Layer#getFeatures method with fast hit detection for VectorLayer 2019-10-08 08:23:38 +02:00
Frederic Junod
f20db28901 Align layer canvas to the left
So that the position is not affected by the `text-align` css rule.
2019-10-07 13:48:32 +02:00
Simon Seyock
6b5c2f47bb reduced typecasts in layerrenderer 2019-09-25 15:24:37 +02:00
Frederic Junod
1f00da8d83 Remove glContext from RenderEvent 2019-06-17 13:52:56 +02:00
Frederic Junod
ec5e8bfa50 Set pixelTransform and inversePixelTransform as protected
The variables are used in child classes
2019-06-14 14:52:28 +02:00
ahocevar
d8f41a9d73 Only reuse target when className is the same 2019-05-24 10:16:20 +02:00
ahocevar
ace5c65ee5 Smarter opacity handling 2019-05-22 16:47:23 +02:00
ahocevar
ae47d3df58 Use opacity from layer state 2019-05-22 16:47:22 +02:00
ahocevar
7895b16043 Reuse container for raster and vector image layers 2019-05-22 16:47:20 +02:00
ahocevar
a45e704be2 Smarter reuse detection 2019-05-22 16:46:46 +02:00
ahocevar
d1f1b468b1 Reuse target for image layers 2019-05-22 16:46:46 +02:00
ahocevar
a55505b36a Reuse containers for tile, vector and vector tile layers 2019-05-22 16:46:40 +02:00
ahocevar
606443bc6d Pass render target of previous layer to next layer 2019-05-22 15:56:51 +02:00
Frederic Junod
6de566d95b Set the canvas size to 0 on dispose 2019-03-08 13:25:49 +01:00
Tim Schaub
06a0a7f33b Use the inverse pixel transform when clipping and getting pixel data 2018-11-17 16:28:28 +01:00
Tim Schaub
af10f6a75c Use the inverse pixel transform in pre/post render events 2018-11-17 16:28:28 +01:00
Tim Schaub
686847f491 Make forward and inverse pixel transforms during render 2018-11-17 16:28:27 +01:00
Tim Schaub
038f122d11 Clip tile layers by extent 2018-11-16 14:57:17 +01:00
Tim Schaub
5ad73f8bbd Implement getDataAtPixel for all layer renderers 2018-11-16 14:57:14 +01:00
Tim Schaub
832dadb3af Dedicated transforms 2018-11-16 14:57:14 +01:00
Tim Schaub
32495388b9 Transform origin top left 2018-11-16 14:57:13 +01:00
ahocevar
ee536fb70d Remove unused code and imports 2018-11-16 14:57:12 +01:00
ahocevar
6c0b3f773b New render event API (non functional yet) 2018-11-16 14:57:12 +01:00
Tim Schaub
f90efac131 Smaller canvas when rotating vector layers 2018-11-16 14:57:11 +01:00
Tim Schaub
b5378deb45 Create context in the canvas layer base class 2018-11-16 14:57:11 +01:00
Tim Schaub
610fcab79e Dispatch pre and post render events 2018-11-16 14:56:49 +01:00
Tim Schaub
433ab97d1c End of composeFrame 2018-11-16 14:56:48 +01:00
Frederic Junod
5eed22286b Don't compute value more that once 2018-11-13 12:08:53 +01:00
Tim Schaub
afc64258af Support for rotation 2018-11-12 18:33:02 +01:00
Tim Schaub
43ed2c1764 Composite renderer 2018-11-12 14:54:52 +01:00
Tim Schaub
0091bfa106 Remove unnecessary type casts in canvas layer renderer 2018-11-04 09:57:19 -07:00
ahocevar
1cdd040c96 Throw when calling abstract methods; fix abstract return types 2018-10-30 18:55:49 +01:00
Frederic Junod
f58cd03f3b Remove extra parameters 2018-09-28 09:13:43 +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
Tim Schaub
792e7e54f1 Clean up ol/renderer/canvas classes 2018-07-17 18:15:47 -06:00