Commit Graph

60 Commits

Author SHA1 Message Date
mike-000 4c7a1817fa optimise check for NaN in extent 2020-06-24 12:46:02 +01:00
mike-000 74b74e2478 fix pettier 2020-06-17 16:59:56 +01:00
mike-000 1685913a55 getExtent() return getEmpty() for invalid extents 2020-06-17 16:46:24 +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
Frederic Junod f392f6b6bb Remove all inheritDoc tags from src/ol/geom 2020-04-03 07:52:51 +02:00
mike-000 2b1417df3f Revise the description of applyTransform
Revise the description of applyTransform and transformFn (loosely based on that used in ol/extent) to avoid any misunderstanding that the function is called inside a forEach method.
2019-10-16 13:59:38 +01:00
Tim Schaub d3b47c794e Make the immediate API work with a user projection 2019-09-30 08:28:50 -06:00
Tim Schaub 965d0541f2 Merge pull request #10004 from tschaub/revisions
Return a new simplified geometry after modification
2019-09-26 09:22:12 +02:00
Tim Schaub 680372ac3f Return a new simplified geometry after modification 2019-09-25 17:26:22 +02:00
Simon Seyock bb0b94fedf fixed typescript issues 2019-09-25 14:10:05 +02:00
Tim Schaub c071c749eb Merge pull request #9981 from KlausBenndorf/replace-geometry-cache
Remove simplified geometry cache
2019-09-24 18:11:33 +02:00
Tim Schaub 30cbbfea9d Get simplified transformed geometry and load features in user projection 2019-09-24 17:45:04 +02:00
Simon Seyock 6866f06375 Remove simplified geometry cache 2019-09-24 16:55:33 +02:00
Frederic Junod 2db953ceb1 Use markdown link syntax in jsdoc 2019-05-27 11:06:12 +02:00
timkeane 7274798aa1 Implement ol/geom/Geometry#containsXY
Fixes issue #8863
ol/source/Vector#getFeaturesAtCoordinate and
implementations of ol/geom/Geometry#containsXY
2018-11-12 17:15:44 +01:00
Frederic Junod caf11a71f2 Simplify import path in ol/geom/ 2018-11-05 16:26:45 +01:00
ahocevar 1cdd040c96 Throw when calling abstract methods; fix abstract return types 2018-10-30 18:55:49 +01:00
Florent gravin 9c6e14b050 Remove duplicate containsXY fn 2018-09-19 16:51:43 +02:00
Florent gravin 8b83371272 Feature opt_geometryOrProperties cannot be null 2018-09-19 16:48:51 +02:00
Florent gravin cd169ede0d Correct cast of Projection in Geometry.transform 2018-09-19 16:48:51 +02:00
Florent gravin bd655b325d Implement Geometry containsXY with correct signature 2018-09-19 16:48:51 +02:00
Frederic Junod 7cb85fa975 Don't define functions in the prototype
If `VOID` is used, TypeScript is not able to figure out what the function parameters are.

Before:
```
$ npx tsc | wc -l
    1188
```

After:
```
$ npx tsc | wc -l
    1169
```
2018-09-19 08:40:14 +02:00
Frederic Junod ea616e7751 Don't import ourselves 2018-09-06 09:05:32 +02:00
Frederic Junod 71328530fe Remove unnecessary 'function' in jsdoc blocks 2018-09-05 16:40:45 +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
Frederic Junod b3586bed8d Remove extra translate function in Geometry, add missing api tag 2018-07-27 13:19:12 +02:00
Tim Schaub affbf59b77 Use Object<Foo, Bar> instead of Object.<Foo, Bar> 2018-07-25 18:33:49 -07:00
Paul Golmann e3e6a28e18 Add abstract translate to ol/geom/Geometry 2018-07-20 15:40:53 +02:00
Tim Schaub e1e34e5636 Replace @see with See. 2018-07-19 08:37:32 -06:00
Frederic Junod c707b4c746 Use extends and super for geom 2018-07-17 16:21:54 +02:00
Tim Schaub d0ab8dce38 Lint removal 2018-07-16 17:57:57 -06:00
Tim Schaub 7b4a73f3b9 Automated class transform
npx lebab --replace src --transform class
2018-07-16 16:18:16 -06:00
ahocevar 28409486a5 Make classes in ol/ available as named exports from ol 2018-06-21 18:08:17 +02:00
ahocevar 440d1ad3e1 Shorter module paths for default exports 2018-04-25 17:25:39 +02:00
ahocevar c23a5086ae Fix enum types 2018-04-21 10:48:38 +02:00
Frederic Junod e9ce23a461 Move the temporary arrays to the module level
No need to create a new variable for each instance.
2018-03-28 08:55:27 +02:00
Tim Schaub 414792f707 Module type for BaseObject 2018-03-18 09:50:48 -06:00
Tim Schaub a743ec3989 Module types for ol/proj 2018-03-12 08:32:09 -06:00
Tim Schaub ef70d71636 Module types for ol/geom 2018-03-12 08:32:09 -06:00
Andreas Hocevar 95d6251dbb Get rid of olx.js and typedef.js typedefs for ol 2018-03-08 18:57:24 +01:00
Marc Jansen 183b8e29c4 Named exports from ol/transform 2018-02-15 17:55:54 +01:00
raiyni b2d920bbf1 ol/geom/flat/transform export 2018-02-13 09:22:00 -06:00
Tim Schaub ad62739a6e Use blocked scoped variables
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00
Tim Schaub 24dd0ca924 Rename _ol_Object_ to BaseObject 2018-01-10 09:35:43 -07:00
Tim Schaub a04144c3c2 Rename _ol_proj_Units_ to Units 2018-01-10 09:35:42 -07:00
Frederic Junod 2498bba90a Named exports from ol/functions 2017-12-15 13:44:32 +01:00
Tim Schaub 87e665d60e Rename _ol_geom_Geometry_ to Geometry 2017-12-14 08:58:46 -07:00
Tim Schaub 6f72ffe498 Named exports from ol/proj 2017-12-14 13:08:40 +01:00
Andreas Hocevar c0c43bca84 Use named imports from extent 2017-12-13 14:05:42 +01:00
Tim Schaub 87295a74dd Use named exports from ol/index.js 2017-12-12 12:34:23 -07:00