Skip to content

Commit

Permalink
Merge pull request #869 from Isti115/master
Browse files Browse the repository at this point in the history
Add ".js" extension to import declarations (fixes #868)
  • Loading branch information
Viglino authored Oct 4, 2022
2 parents 81fab01 + 2b685ca commit cf12111
Show file tree
Hide file tree
Showing 237 changed files with 896 additions and 896 deletions.
6 changes: 3 additions & 3 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ In Openlayers classes just replace the `point` by a `underscore`.
The file name must reflect the name of the extension and should be placed in the src directory corresponding to its namespace.
Thus `ol_control_MyControl`must be created in the `./src/control/MyControl.js` file and can be used in a webpack as:
````javascript
import ol_control_MyControl from 'ol-ext/control/MyControl';
import ol_control_MyControl from 'ol-ext/control/MyControl.js';
````

Example:
````javascript
// Import ol classes
import ol_ext_inherits from '../util/ext'
import ol_control_Control from 'ol/control/Control'
import ol_ext_inherits from '../util/ext.js'
import ol_control_Control from 'ol/control/Control.js'

// Create my control
var ol_control_MyControl = function(options) {
Expand Down
2 changes: 1 addition & 1 deletion src/control/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
released under the CeCILL-B license (French BSD license)
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/
import ol_control_Control from 'ol/control/Control'
import ol_control_Control from 'ol/control/Control.js'

/** Control bar for OL3
* The control bar is a container for other controls. It can be used to create toolbars.
Expand Down
4 changes: 2 additions & 2 deletions src/control/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
released under the CeCILL-B license (French BSD license)
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/
import ol_control_Control from 'ol/control/Control'
import ol_control_Control from 'ol/control/Control.js'

import ol_ext_element from '../util/element'
import ol_ext_element from '../util/element.js'

/** A simple push button control
* @constructor
Expand Down
12 changes: 6 additions & 6 deletions src/control/CanvasAttribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
released under the CeCILL-B license (French BSD license)
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/
import {unByKey as ol_Observable_unByKey} from 'ol/Observable'
import ol_control_Attribution from 'ol/control/Attribution'
import ol_style_Style from 'ol/style/Style'
import {asString as ol_color_asString} from 'ol/color'
import ol_control_CanvasBase from './CanvasBase'
import ol_ext_element from '../util/element'
import {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'
import ol_control_Attribution from 'ol/control/Attribution.js'
import ol_style_Style from 'ol/style/Style.js'
import {asString as ol_color_asString} from 'ol/color.js'
import ol_control_CanvasBase from './CanvasBase.js'
import ol_ext_element from '../util/element.js'

/**
* @classdesc
Expand Down
14 changes: 7 additions & 7 deletions src/control/CanvasBase.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import ol_control_Control from 'ol/control/Control'
import {unByKey as ol_Observable_unByKey} from 'ol/Observable'
import ol_style_Style from 'ol/style/Style'
import ol_style_Fill from 'ol/style/Fill'
import ol_style_Stroke from 'ol/style/Stroke'
import ol_style_Text from 'ol/style/Text'
import ol_ext_getMapCanvas from '../util/getMapCanvas'
import ol_control_Control from 'ol/control/Control.js'
import {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'
import ol_style_Style from 'ol/style/Style.js'
import ol_style_Fill from 'ol/style/Fill.js'
import ol_style_Stroke from 'ol/style/Stroke.js'
import ol_style_Text from 'ol/style/Text.js'
import ol_ext_getMapCanvas from '../util/getMapCanvas.js'

/**
* @classdesc
Expand Down
12 changes: 6 additions & 6 deletions src/control/CanvasScaleLine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
released under the CeCILL-B license (French BSD license)
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/
import {unByKey as ol_Observable_unByKey} from 'ol/Observable'
import ol_control_ScaleLine from 'ol/control/ScaleLine'
import ol_style_Style from 'ol/style/Style'
import {asString as ol_color_asString} from 'ol/color'
import ol_control_CanvasBase from './CanvasBase'
import ol_ext_element from '../util/element'
import {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'
import ol_control_ScaleLine from 'ol/control/ScaleLine.js'
import ol_style_Style from 'ol/style/Style.js'
import {asString as ol_color_asString} from 'ol/color.js'
import ol_control_CanvasBase from './CanvasBase.js'
import ol_ext_element from '../util/element.js'
/**
* @classdesc
* OpenLayers Scale Line Control integrated in the canvas (for jpeg/png export purposes).
Expand Down
6 changes: 3 additions & 3 deletions src/control/CanvasTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import {asString as ol_color_asString} from 'ol/color'
import {asString as ol_color_asString} from 'ol/color.js'

import ol_control_CanvasBase from './CanvasBase'
import ol_ext_element from '../util/element'
import ol_control_CanvasBase from './CanvasBase.js'
import ol_ext_element from '../util/element.js'

/**
* A title Control integrated in the canvas (for jpeg/png export purposes).
Expand Down
10 changes: 5 additions & 5 deletions src/control/CenterPosition.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import {asString as ol_color_asString} from 'ol/color'
import {toStringXY as ol_coordinate_toStringXY} from 'ol/coordinate'
import {transform as ol_proj_transform} from 'ol/proj'
import {asString as ol_color_asString} from 'ol/color.js'
import {toStringXY as ol_coordinate_toStringXY} from 'ol/coordinate.js'
import {transform as ol_proj_transform} from 'ol/proj.js'

import ol_control_CanvasBase from './CanvasBase'
import ol_ext_element from '../util/element'
import ol_control_CanvasBase from './CanvasBase.js'
import ol_ext_element from '../util/element.js'

/**
* A Control to display map center coordinates on the canvas.
Expand Down
6 changes: 3 additions & 3 deletions src/control/Cloud.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/control/Compass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import ol_control_CanvasBase from './CanvasBase'
import ol_style_Style from 'ol/style/Style'
import ol_style_Stroke from 'ol/style/Stroke'
import ol_ext_element from '../util/element';
import ol_control_CanvasBase from './CanvasBase.js'
import ol_style_Style from 'ol/style/Style.js'
import ol_style_Stroke from 'ol/style/Stroke.js'
import ol_ext_element from '../util/element.js';

/**
* Draw a compass on the map. The position/size of the control is defined in the css.
Expand Down
4 changes: 2 additions & 2 deletions src/control/Dialog.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ol_control_Control from 'ol/control/Control'
import ol_ext_element from '../util/element'
import ol_control_Control from 'ol/control/Control.js'
import ol_ext_element from '../util/element.js'

/**
* @classdesc
Expand Down
2 changes: 1 addition & 1 deletion src/control/Disable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ol_control_Control from 'ol/control/Control'
import ol_control_Control from 'ol/control/Control.js'

/** A simple control to disable all actions on the map.
* The control will create an invisible div over the map.
Expand Down
36 changes: 18 additions & 18 deletions src/control/EditBar.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import {shiftKeyOnly as ol_events_condition_shiftKeyOnly} from 'ol/events/condition'
import {click as ol_events_condition_click} from 'ol/events/condition'
import ol_interaction_Draw from 'ol/interaction/Draw'
import ol_geom_LineString from 'ol/geom/LineString'
import ol_geom_Polygon from 'ol/geom/Polygon'
import ol_interaction_Select from 'ol/interaction/Select'
import {shiftKeyOnly as ol_events_condition_shiftKeyOnly} from 'ol/events/condition.js'
import {click as ol_events_condition_click} from 'ol/events/condition.js'
import ol_interaction_Draw from 'ol/interaction/Draw.js'
import ol_geom_LineString from 'ol/geom/LineString.js'
import ol_geom_Polygon from 'ol/geom/Polygon.js'
import ol_interaction_Select from 'ol/interaction/Select.js'

import ol_control_Bar from './Bar'
import ol_control_Button from './Button'
import ol_control_Toggle from './Toggle'
import ol_control_TextButton from './TextButton'
import ol_interaction_Delete from '../interaction/Delete'
import ol_ext_element from '../util/element'
import ol_interaction_Offset from '../interaction/Offset'
import ol_interaction_Split from '../interaction/Split'
import ol_interaction_Transform from '../interaction/Transform'
import ol_interaction_ModifyFeature from '../interaction/ModifyFeature'
import ol_interaction_DrawRegular from '../interaction/DrawRegular'
import ol_interaction_DrawHole from '../interaction/DrawHole'
import ol_control_Bar from './Bar.js'
import ol_control_Button from './Button.js'
import ol_control_Toggle from './Toggle.js'
import ol_control_TextButton from './TextButton.js'
import ol_interaction_Delete from '../interaction/Delete.js'
import ol_ext_element from '../util/element.js'
import ol_interaction_Offset from '../interaction/Offset.js'
import ol_interaction_Split from '../interaction/Split.js'
import ol_interaction_Transform from '../interaction/Transform.js'
import ol_interaction_ModifyFeature from '../interaction/ModifyFeature.js'
import ol_interaction_DrawRegular from '../interaction/DrawRegular.js'
import ol_interaction_DrawHole from '../interaction/DrawHole.js'

/** Control bar for editing in a layer
* @constructor
Expand Down
4 changes: 2 additions & 2 deletions src/control/Gauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import ol_control_Control from 'ol/control/Control'
import ol_ext_element from '../util/element'
import ol_control_Control from 'ol/control/Control.js'
import ol_ext_element from '../util/element.js'

/** A simple gauge control to display level information on the map.
*
Expand Down
4 changes: 2 additions & 2 deletions src/control/GeoBookmark.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ol_control_Control from 'ol/control/Control'
import ol_ext_element from '../util/element'
import ol_control_Control from 'ol/control/Control.js'
import ol_ext_element from '../util/element.js'

/** Bookmark positions on ol maps.
*
Expand Down
12 changes: 6 additions & 6 deletions src/control/GeolocationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import {unByKey as ol_Observable_unByKey} from 'ol/Observable'
import ol_control_Bar from './Bar'
import ol_control_Toggle from './Toggle'
import ol_control_Button from './Button'
import ol_control_TextButton from './TextButton'
import ol_interaction_GeolocationDraw from '../interaction/GeolocationDraw'
import {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'
import ol_control_Bar from './Bar.js'
import ol_control_Toggle from './Toggle.js'
import ol_control_Button from './Button.js'
import ol_control_TextButton from './TextButton.js'
import ol_interaction_GeolocationDraw from '../interaction/GeolocationDraw.js'


/** Geolocation bar
Expand Down
4 changes: 2 additions & 2 deletions src/control/GeolocationButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import ol_control_Toggle from './Toggle'
import ol_interaction_GeolocationDraw from '../interaction/GeolocationDraw'
import ol_control_Toggle from './Toggle.js'
import ol_interaction_GeolocationDraw from '../interaction/GeolocationDraw.js'

/** Geolocation bar
* The control bar is a container for other controls. It can be used to create toolbars.
Expand Down
22 changes: 11 additions & 11 deletions src/control/Globe.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import {unByKey as ol_Observable_unByKey} from 'ol/Observable'
import ol_control_Control from 'ol/control/Control'
import ol_Map from 'ol/Map'
import ol_Collection from 'ol/Collection'
import ol_View from 'ol/View'
import ol_layer_Vector from 'ol/layer/Vector'
import ol_style_Style from 'ol/style/Style'
import ol_style_Circle from 'ol/style/Circle'
import ol_style_Fill from 'ol/style/Fill'
import ol_style_Stroke from 'ol/style/Stroke'
import ol_source_Vector from 'ol/source/Vector'
import {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'
import ol_control_Control from 'ol/control/Control.js'
import ol_Map from 'ol/Map.js'
import ol_Collection from 'ol/Collection.js'
import ol_View from 'ol/View.js'
import ol_layer_Vector from 'ol/layer/Vector.js'
import ol_style_Style from 'ol/style/Style.js'
import ol_style_Circle from 'ol/style/Circle.js'
import ol_style_Fill from 'ol/style/Fill.js'
import ol_style_Stroke from 'ol/style/Stroke.js'
import ol_source_Vector from 'ol/source/Vector.js'

/**
* OpenLayers 3 lobe Overview Control.
Expand Down
16 changes: 8 additions & 8 deletions src/control/Graticule.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import ol_proj_Projection from 'ol/proj/Projection'
import ol_style_Style from 'ol/style/Style'
import ol_style_Stroke from 'ol/style/Stroke'
import ol_style_Fill from 'ol/style/Fill'
import ol_style_Text from 'ol/style/Text'
import {transform as ol_proj_transform} from 'ol/proj'
import {get as ol_proj_get} from 'ol/proj'
import ol_control_CanvasBase from './CanvasBase'
import ol_proj_Projection from 'ol/proj/Projection.js'
import ol_style_Style from 'ol/style/Style.js'
import ol_style_Stroke from 'ol/style/Stroke.js'
import ol_style_Fill from 'ol/style/Fill.js'
import ol_style_Text from 'ol/style/Text.js'
import {transform as ol_proj_transform} from 'ol/proj.js'
import {get as ol_proj_get} from 'ol/proj.js'
import ol_control_CanvasBase from './CanvasBase.js'

/** Draw a graticule on the map.
* @constructor
Expand Down
12 changes: 6 additions & 6 deletions src/control/GridReference.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import ol_style_Style from 'ol/style/Style'
import ol_style_Stroke from 'ol/style/Stroke'
import ol_style_Fill from 'ol/style/Fill'
import ol_style_Text from 'ol/style/Text'
import {boundingExtent as ol_extent_boundingExtent} from 'ol/extent'
import ol_control_CanvasBase from './CanvasBase'
import ol_style_Style from 'ol/style/Style.js'
import ol_style_Stroke from 'ol/style/Stroke.js'
import ol_style_Fill from 'ol/style/Fill.js'
import ol_style_Text from 'ol/style/Text.js'
import {boundingExtent as ol_extent_boundingExtent} from 'ol/extent.js'
import ol_control_CanvasBase from './CanvasBase.js'

/**
* Draw a grid reference on the map and add an index.
Expand Down
8 changes: 4 additions & 4 deletions src/control/Imageline.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {unByKey as ol_Observable_unByKey} from 'ol/Observable'
import ol_control_Control from 'ol/control/Control'
import ol_ext_element from '../util/element'
import ol_ext_getMapCanvas from '../util/getMapCanvas'
import {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'
import ol_control_Control from 'ol/control/Control.js'
import ol_ext_element from '../util/element.js'
import ol_ext_getMapCanvas from '../util/getMapCanvas.js'

/** Image line control
*
Expand Down
12 changes: 6 additions & 6 deletions src/control/IsochroneGeoportail.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
released under the CeCILL-B license (French BSD license)
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/
import ol_control_Control from 'ol/control/Control'
import ol_format_WKT from 'ol/format/WKT'
import {toLonLat as ol_proj_toLonLat} from 'ol/proj'
import ol_ext_Ajax from '../util/Ajax';
import ol_ext_element from '../util/element';
import ol_control_SearchGeoportail from './SearchGeoportail'
import ol_control_Control from 'ol/control/Control.js'
import ol_format_WKT from 'ol/format/WKT.js'
import {toLonLat as ol_proj_toLonLat} from 'ol/proj.js'
import ol_ext_Ajax from '../util/Ajax.js';
import ol_ext_element from '../util/element.js';
import ol_control_SearchGeoportail from './SearchGeoportail.js'

/**
* Geoportail isochrone Control.
Expand Down
4 changes: 2 additions & 2 deletions src/control/LayerPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
released under the CeCILL-B license (French BSD license)
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/
import ol_control_LayerSwitcher from './LayerSwitcher'
import ol_ext_element from '../util/element';
import ol_control_LayerSwitcher from './LayerSwitcher.js'
import ol_ext_element from '../util/element.js';

/**
* OpenLayers Layer Switcher Control.
Expand Down
4 changes: 2 additions & 2 deletions src/control/LayerShop.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
(http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).
*/

import ol_ext_element from '../util/element'
import ol_control_LayerSwitcher from '../control/LayerSwitcher'
import ol_ext_element from '../util/element.js'
import ol_control_LayerSwitcher from '../control/LayerSwitcher.js'

/** LayerShop a layer switcher with special controls to handle operation on layers.
* @fires select
Expand Down
Loading

0 comments on commit cf12111

Please sign in to comment.