Commit Graph

142 Commits

Author SHA1 Message Date
Andreas Hocevar
93de780671 Draw a sketch point when adding a vertex programmatically 2021-07-13 16:07:59 +02:00
Andreas Hocevar
e9e664f3c9 Add typed signature for Observable#un() 2021-07-10 11:28:50 +02:00
Simon Seyock
d914006d51 Add signatures for once. 2021-07-10 11:28:49 +02:00
Simon Seyock
1870a64984 Add CombinedOnSignature. 2021-07-10 11:28:49 +02:00
Simon Seyock
e9a161740a controls and interactions. 2021-07-10 11:28:48 +02:00
Simon Seyock
c8f43050c4 Revert "Merge pull request #12416 from ahocevar/eventtype-generics"
This reverts commit b6c143deb2, reversing
changes made to 7777821df5.
2021-07-10 11:28:46 +02:00
Andreas Hocevar
79f5f46d27 Remove lint 2021-06-28 18:10:51 +02:00
Andreas Hocevar
b6c143deb2 Merge pull request #12416 from ahocevar/eventtype-generics
Use generics to limit event types in on(), once() and un()
2021-06-21 09:36:25 +02:00
Andreas Hocevar
4dd75d75e3 Merge pull request #12414 from ahocevar/change-event-type
Replace getChangeEventType() with add/removeChangeListener methods
2021-06-21 08:04:23 +02:00
Andreas Hocevar
018ad97f25 Use generics to limit event types in on(), once() and un() 2021-06-20 22:25:47 +02:00
Andreas Hocevar
343e0ffce9 Replace getChangeEventType() with add/removeChangeListener methods 2021-06-19 23:16:26 +02:00
Tim Schaub
f798902ecd Fix JSDoc generated links 2021-06-17 21:54:07 -06:00
Andreas Hocevar
0da0c903a0 MapBrowserEvent#preventDefault() behaves the same as with native events 2021-04-05 10:05:32 +02:00
Maximilian Krög
801dba4a38 Call Draw finishCondition for every type 2021-02-27 12:04:17 +01:00
Maximilian Krög
288fd0b74c Improve Draw type to mode conversion
Throw error if Draw is configured with an invalid type.
2021-02-27 11:12:24 +01:00
Simon Seyock
8facb252f1 Replace google closure syntax = with brackets around name 2021-02-03 14:06:02 +01:00
Andreas Hocevar
99dd55920e Restore stopClick functionality 2021-01-07 22:34:21 +01:00
Maximilian Krög
bd4622940e Call the finishCondition when drawing points / circles 2020-12-11 00:29:30 +01:00
Andreas Hocevar
6c6b559ce4 Merge pull request #11817 from greggian/select-stop-propagation
stopPropagation support for PluggableMap
2020-12-10 16:15:25 +01:00
Greg Gianforcaro
9c2b0677fa stopPropagation/preventDefault on originalEvent
Move stopPropagation/preventDefault to directly target the
originalEvent rather than the mapBrowserEvent.
2020-12-09 11:42:53 -05:00
Andreas Hocevar
c557b2e7bb Remove unnecessary line that breaks drawing with multi-touch 2020-12-08 18:53:17 +01:00
Andreas Hocevar
ecb9778fbf Set sketch cursor to last appended coordinate 2020-12-08 16:16:14 +01:00
Andreas Hocevar
0bd04eafe0 Pass around pixels/coords to fix appendCoordinates 2020-12-08 14:52:36 +01:00
Andreas Hocevar
ec53d4fc57 Remove no longer needed checks for coordinates.length 2020-12-08 14:52:35 +01:00
Andreas Hocevar
651c1aa6c4 Fix removeLastPoint when removing last point 2020-12-08 14:52:35 +01:00
mike-000
c0875e38e7 Restore Mode.CIRCLE 2020-11-27 11:42:51 +00:00
mike-000
919c711756 New function createOrUpdateCustomSketchLine_ 2020-11-25 12:06:34 +00:00
mike-000
8898d540fa New function createOrUpdateCustomSketchLine_
New function for duplicated code handling sketch line for custom polygons
2020-11-25 11:59:32 +00:00
mike-000
f8df533cb0 Use Mode.LINE_STRING for Circle geometries
Make predefined geometry functions compatible with removeLastPoint
Add undo to example
Make geometry function for Star compatible with use of removeLastPoint
Additional createRegularPolygon tests
2020-11-24 10:39:28 +00:00
Andreas Hocevar
9885b79509 Document that snapTolerance must be greater than 0 2020-11-18 10:44:41 +01:00
Andreas Hocevar
df261f6e0f Initialize sketch point on Draw#extend() 2020-11-05 18:27:40 +01:00
Andreas Hocevar
48f357d518 Visual feedback for removeLastPoint() on touch devices 2020-10-29 22:06:51 +01:00
Andreas Hocevar
23a544aa30 Only draw when one pointer is active 2020-10-29 20:00:12 +01:00
Stéphane Brunner
23e5c7ced8 Export all the Event sub class
Actually only some are exported

This is useful to type the received events
2020-09-25 13:15:49 +02:00
Andreas Hocevar
fda93cee23 Updates for TypeScript v4 2020-08-25 13:03:58 +02:00
Andreas Hocevar
33ce206bab Get rid of MapBrowserPointerEvent 2020-05-10 16:54:34 +02:00
Andreas Hocevar
b0f20d6bd6 Use imports for enum types 2020-04-15 10:53:23 +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
7dd6d72093 Avoid page scrolling when freehand drawing on mobile 2020-04-05 22:02:19 +02:00
Frederic Junod
da8ef43db7 Remove all inheritDoc tags from src/ol/interaction 2020-04-03 07:52:51 +02:00
Jackie Ng
6d16fe8405 Make arg2 of GeometryFunction also optional as it comes after an optional arg1 2020-03-05 01:01:03 +11:00
Thomas Chandelle
33a8466913 Add API method abortDrawing and dispatch a DRAWABORT event 2020-02-13 17:22:39 +01:00
Olivier Guyot
8d4c3b2887 Draw / clearer variable names 2020-02-11 11:19:55 +01:00
Olivier Guyot
3c5d0f223e Draw / fix map object in addToDrawing method 2020-02-10 16:55:35 +01:00
Otto Pellinen
02597229e3 Cleanup comments 2020-02-10 16:48:12 +01:00
Otto Pellinen
bc79d59811 Use private function addToDrawing_ in appendCoordinates 2020-02-10 16:48:12 +01:00
Otto Pellinen
f43bc8d122 Fix comment for appendCoordinates 2020-02-10 16:48:12 +01:00
Otto Pellinen
175695f877 Update function descriptions for clarity 2020-02-10 16:48:12 +01:00
Otto Pellinen
83c0a258e6 Separate appendCoordinates function from extend 2020-02-10 16:48:12 +01:00
Otto Pellinen
25a5e83910 Fix eslint errors 2020-02-10 16:48:12 +01:00