Commit Graph

250 Commits

Author SHA1 Message Date
Simon Seyock 2ad5789797 Add descriptions for properties. 2021-02-04 18:19:33 +01:00
Simon Seyock 8facb252f1 Replace google closure syntax = with brackets around name 2021-02-03 14:06:02 +01:00
Maximilian Krög 17659b9a80 Do not fire duplicate postrender events 2020-12-24 02:25:42 +01:00
Greg Gianforcaro 99f23caf03 Initial stopPropagation support for PluggableMap 2020-12-09 00:46:56 -05:00
Andreas Hocevar 8ceaadc7c8 Merge pull request #11781 from ahocevar/hitdetect-geometry
Pass geometry to forEachFeatureAtPixel callback
2020-12-01 09:59:43 +01:00
Andreas Hocevar 4e885181b5 Fix forEachFeatureAtPixel apidoc output 2020-11-28 23:55:25 +01:00
Andreas Hocevar 5659397b39 No need to adjust hitTolerance for pixel ratio 2020-11-28 09:18:17 +01:00
Andreas Hocevar 28aaa2e0d3 Pass geometry to forEachFeatureAtPixel callback 2020-11-27 13:43:28 +01:00
Andreas Hocevar eba0ba6ae0 Merge pull request #11592 from ahocevar/new-declutter
New decluttering implementation
2020-10-07 10:33:33 +02:00
elnabo 81103c9253 Allow mouse input if map is rendered in an other window 2020-10-02 09:39:19 +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
Andreas Hocevar 869206b33d Only use elementFromPoint with ShadowRoot 2020-09-10 11:22:33 +02:00
Andreas Hocevar fda93cee23 Updates for TypeScript v4 2020-08-25 13:03:58 +02:00
Andreas Hocevar c55a3132a4 Checks before calling handleEvent on interactions 2020-08-18 15:39:53 +02:00
Andreas Hocevar aa6d6b4d80 Merge pull request #11305 from megawac/avoid-crash-when-interaction-removed
PluggableMap: avoid crash when multiple interactions are removed
2020-08-18 13:21:47 +02:00
Graeme Yeates d7a8e45294 PluggableMap: avoid crash when multiple interactions are removed 2020-08-10 10:32:51 -04:00
Andreas Hocevar 93d3528047 Do not rely on old value for target 2020-07-27 17:23:42 +02:00
Andreas Hocevar fe16ce6b4d IE does not support document.contains 2020-07-27 11:31:29 +02:00
Andreas Hocevar 2de96d5c84 Merge pull request #11270 from ahocevar/control-events
Fix handling of events originating from overlayContainerStopEvent children
2020-07-22 09:48:26 +02:00
Andreas Hocevar 56db05772c Register and unregister events in set target handler 2020-07-19 19:24:51 +02:00
Andreas Hocevar 14b7b1d993 Fix handling of events originating from overlayContainerStopEvent children 2020-07-12 13:15:11 +02:00
Andreas Hocevar 6c09fa5c44 Handle out of shadow dom dragging and explain logic better 2020-05-22 09:49:27 +02:00
Andreas Hocevar 12b2269265 Fix outside window dragging 2020-05-22 09:18:50 +02:00
Andreas Hocevar 1a2b4bd479 Merge pull request #11025 from ahocevar/no-more-mapbrowser-pointer-event
Get rid of MapBrowserPointerEvent
2020-05-11 09:11:00 +02:00
Andreas Hocevar c6341bbcd9 Fix types for events 2020-05-10 18:19:45 +02:00
Andreas Hocevar 12b5a829d9 Make events work when inside a web component 2020-05-10 08:40:47 +02:00
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