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.
* Auto-pan settings currently only activate when the position of the
Overlay is set and the Overlay is already on a Map.
* The consequence of this is that creating an Overlay with position
set and then adding to a Map results in no auto-pan being performed -
it is necessary to first create the Overlay, then add to a Map and
finally set the position in order for the Map to auto-pan.
* This commit changes this behaviour so that the auto-pan settings are
also considered when the map property of the Overlay is set and not
only when the position property is set, leading to a more intuitive
behaviour.
* Fixes Issue #10843
* If panIntoView is an API method, it may now be called when the
position of the overlay has not yet been set.
* Adds a check for a set position to the panIntoView() method,
and removes the now unneccessary check in handlePositionChanged()
* Follow the suggestion from @ahocevar to use the existing
autoPan constructor option instead of creating a new autoPanOptions
option
* Internally also store the autoPanOptions in autoPan
* animation and margin encapsulated in a single object to allow
easier extension in future
* Constructor options extended to allow single object for
autoPan; separate options still allowed but deprecated
* Protected fields for animation and margin replaced with single
field