Commit Graph

173 Commits

Author SHA1 Message Date
Andreas Hocevar
7f6258dd0d Set pointerEvents style programmatically instead of relying on ol.css 2020-04-16 17:34:40 +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
Frédéric Junod
d8cbda18a7 Merge pull request #10840 from fredj/remove_inheritDoc
Remove inherit doc
2020-04-04 14:06:43 +02:00
Frederic Junod
d15ec1c12c Remove all inheritDoc tags from disposeInternal functions 2020-04-03 08:10:41 +02:00
Olivier Guyot
32321e381c View / avoid solving constraints related to map size change during anim 2020-04-02 14:22:47 +02:00
Andreas Hocevar
f896d9fb03 Move tile priority function to the TileQueue module 2020-03-23 12:46:18 +01:00
Andreas Hocevar
b6abe036ce Make events work in shadow dom 2020-02-18 21:32:09 +01:00
Matt Walker
4e599a370b Use document.body to check if an event target is within the page
Some events will originate outside the map viewport such as keyboard
events which originate with the element specified by keyboardEventTarget
which could be document.body
2020-01-13 10:56:41 +00:00
Matt Walker
f3d94b3132 Fix lint error 2020-01-10 11:16:54 +00:00
Matt Walker
34dc538122 Stop events that originate with a removed target
As discussed in https://github.com/openlayers/openlayers/issues/6948#issuecomment-565375694

The check to see if the target is within the "page" uses the viewport as
the MapBrowserEventHandler instance adds it's listeners to the viewport.

Using Node.contains appears to have a slight performance benefit
over manually walking the DOM.
2020-01-10 10:48:15 +00:00
Andreas Hocevar
b26f570cb7 Do not stop events when dragging 2020-01-08 21:39:29 +01:00
Olivier Guyot
4440994ec8 Avoid recomputing the viewport size by reading the DOM everytime
Also clarify View#calculateExtent doc & remove the [data-view] attribute
on the viewport element (not needed anymore).
2019-12-23 10:47:54 +01:00
Andreas Hocevar
2b6925dc1e Remove line that was accidently added with #10332 2019-11-30 18:16:54 +01:00
Andreas Hocevar
88b8b2f7cb Conditional default prevention instead of touch-action: none 2019-11-25 01:09:05 +01:00
Andreas Hocevar
fab8a449c3 Use passive option to avoid Chrome warning 2019-11-13 11:08:44 +01:00
Frederic Junod
6978c69f20 Don't use instanceof HTMLElement in handleMapBrowserEvent
Because not all elements in the DOM are instance of `HTMLElement`.
For example, SVGs created with `document.createElementNS` are instances of `Element`.
2019-11-05 11:08:14 +01:00
Andreas Hocevar
cc24ec1be6 Set touch-action to allow page scrolling 2019-10-24 16:18:40 +02:00
Frederic Junod
daaaff5ac7 Remove unnecessary typecast
Remove typecast where typescript is able to correctly deduce the type.
2019-10-02 10:44:06 +02:00
Frederic Junod
41b7893523 Mark properties as nullable 2019-10-01 10:47:07 +02:00
Frederic Junod
89becd4c6d Remove unused variables 2019-10-01 08:34:00 +02:00
Frederic Junod
f67476dd8f Mark properties as nullable 2019-09-27 13:57:59 +02:00
Frederic Junod
0e402073da Add more typecast for typescript 2019-09-27 13:11:30 +02:00
Frederic Junod
701dc3b54a Use the right variable to get the hitTolerance value 2019-09-27 11:03:21 +02:00
Simon Seyock
54cbe14f88 Check hits for wrapped around geometries 2019-09-26 11:46:10 +02:00
Tim Schaub
b1f0b6997b Additional changes to work with user projection 2019-09-24 19:58:53 +02:00
Tobias Kohr
8c4937170b rename external methods to API names 2019-09-24 18:13:57 +02:00
Tobias Kohr
182ed012e2 review corrections 2019-09-24 17:58:56 +02:00
Tobias Kohr
a0df485736 add tests for modified methods 2019-09-24 17:58:56 +02:00
Tobias Kohr
b1196e7601 fix linting 2019-09-24 17:58:56 +02:00
Tobias Kohr
5711cd30d0 Seperate getEventCoordinate into internal/external method 2019-09-24 17:58:56 +02:00
Tobias Kohr
d4c1589a01 Seperate internal and API methods for the map 2019-09-24 17:58:56 +02:00
Simon Seyock
82486899df getFeatureAtPixel always returns array 2019-09-24 17:16:25 +02:00
Andreas Hocevar
60c2c4e088 Get rid of map focus 2019-09-24 16:02:36 +02:00
Olivier Guyot
b97647d39b Merge pull request #9966 from jahow/allow-disable-canvas-reuse
Document how to circumvent the canvas reuse optimization
2019-09-24 11:16:45 +02:00
Tim Schaub
3c38a38570 Merge pull request #9961 from KlausBenndorf/remove-select-interaction
SelectInteraction removal
2019-09-24 10:27:20 +02:00
Simon Seyock
acac7a9403 remove skipFeature logic 2019-09-24 10:12:30 +02:00
Olivier Guyot
449686527b Document how to avoid canvas reuse for layers
This restores the `map.forEachLayerAtPixel` functionality.

This is intended to help with openlayers#9720
2019-09-24 09:46:32 +02:00
Tim Schaub
2f498c9f58 Set frame state extent when creating frame state 2019-09-23 13:57:48 +02:00
Andreas Hocevar
f0cbc44860 Cancel postrender before disposing renderer 2019-09-12 12:11:07 +02:00
ahocevar
ebfb20440a Simplify events and store listeners only in one place 2019-09-04 16:48:43 +02:00
ahocevar
d416866108 Use pointer events everywhere 2019-08-31 23:40:11 +02:00
Frederic Junod
49a65568d8 Remove unused param in getState function 2019-06-27 15:07:59 +02:00
ahocevar
f864c05070 Less frame budget restrictions 2019-06-23 14:07:22 +02:00
ahocevar
8c21c9196d Move label cache listener management to the renderer 2019-06-03 15:13:30 +02:00
ahocevar
68b7831daf Listen to label cache again when we have a target 2019-06-03 14:28:20 +02:00
ahocevar
153e06e4d5 Detach label cache on Map#setTarget() 2019-06-03 14:14:13 +02:00
Frederic Junod
7c215b2532 Remove TOUCH, POINTER and MSPOINTER from ol/has 2019-06-01 07:18:23 +02:00
Frederic Junod
40c49a9ce5 Remove layerState param from prepareFrame and renderFrame function 2019-05-25 07:19:10 +02:00
bartvde
c76aa76743 Use window instead of global in addEventListener 2019-05-24 14:51:32 +02:00
bartvde
119c24faa2 Use global addEventListener in PluggableMap 2019-05-24 13:45:19 +02:00