Simplify default export

This removes unnecessary variable declarations where the default object is an object.
This commit is contained in:
Frederic Junod
2017-12-15 15:08:33 +01:00
parent 4c5f570e86
commit 0bc28323c8
21 changed files with 39 additions and 54 deletions

View File

@@ -1,10 +1,11 @@
/** /**
* @module ol/GeolocationProperty * @module ol/GeolocationProperty
*/ */
/** /**
* @enum {string} * @enum {string}
*/ */
var _ol_GeolocationProperty_ = { export default {
ACCURACY: 'accuracy', ACCURACY: 'accuracy',
ACCURACY_GEOMETRY: 'accuracyGeometry', ACCURACY_GEOMETRY: 'accuracyGeometry',
ALTITUDE: 'altitude', ALTITUDE: 'altitude',
@@ -16,5 +17,3 @@ var _ol_GeolocationProperty_ = {
TRACKING: 'tracking', TRACKING: 'tracking',
TRACKING_OPTIONS: 'trackingOptions' TRACKING_OPTIONS: 'trackingOptions'
}; };
export default _ol_GeolocationProperty_;

View File

@@ -1,14 +1,13 @@
/** /**
* @module ol/ImageState * @module ol/ImageState
*/ */
/** /**
* @enum {number} * @enum {number}
*/ */
var _ol_ImageState_ = { export default {
IDLE: 0, IDLE: 0,
LOADING: 1, LOADING: 1,
LOADED: 2, LOADED: 2,
ERROR: 3 ERROR: 3
}; };
export default _ol_ImageState_;

View File

@@ -1,14 +1,13 @@
/** /**
* @module ol/MapProperty * @module ol/MapProperty
*/ */
/** /**
* @enum {string} * @enum {string}
*/ */
var _ol_MapProperty_ = { export default {
LAYERGROUP: 'layergroup', LAYERGROUP: 'layergroup',
SIZE: 'size', SIZE: 'size',
TARGET: 'target', TARGET: 'target',
VIEW: 'view' VIEW: 'view'
}; };
export default _ol_MapProperty_;

View File

@@ -1,13 +1,14 @@
/** /**
* @module ol/OverlayPositioning * @module ol/OverlayPositioning
*/ */
/** /**
* Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, * Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`, * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
* `'top-center'`, `'top-right'` * `'top-center'`, `'top-right'`
* @enum {string} * @enum {string}
*/ */
var _ol_OverlayPositioning_ = { export default {
BOTTOM_LEFT: 'bottom-left', BOTTOM_LEFT: 'bottom-left',
BOTTOM_CENTER: 'bottom-center', BOTTOM_CENTER: 'bottom-center',
BOTTOM_RIGHT: 'bottom-right', BOTTOM_RIGHT: 'bottom-right',
@@ -18,5 +19,3 @@ var _ol_OverlayPositioning_ = {
TOP_CENTER: 'top-center', TOP_CENTER: 'top-center',
TOP_RIGHT: 'top-right' TOP_RIGHT: 'top-right'
}; };
export default _ol_OverlayPositioning_;

View File

@@ -1,10 +1,11 @@
/** /**
* @module ol/TileState * @module ol/TileState
*/ */
/** /**
* @enum {number} * @enum {number}
*/ */
var _ol_TileState_ = { export default {
IDLE: 0, IDLE: 0,
LOADING: 1, LOADING: 1,
LOADED: 2, LOADED: 2,
@@ -12,5 +13,3 @@ var _ol_TileState_ = {
EMPTY: 4, EMPTY: 4,
ABORT: 5 ABORT: 5
}; };
export default _ol_TileState_;

View File

@@ -1,12 +1,11 @@
/** /**
* @module ol/ViewHint * @module ol/ViewHint
*/ */
/** /**
* @enum {number} * @enum {number}
*/ */
var _ol_ViewHint_ = { export default {
ANIMATING: 0, ANIMATING: 0,
INTERACTING: 1 INTERACTING: 1
}; };
export default _ol_ViewHint_;

View File

@@ -1,13 +1,12 @@
/** /**
* @module ol/ViewProperty * @module ol/ViewProperty
*/ */
/** /**
* @enum {string} * @enum {string}
*/ */
var _ol_ViewProperty_ = { export default {
CENTER: 'center', CENTER: 'center',
RESOLUTION: 'resolution', RESOLUTION: 'resolution',
ROTATION: 'rotation' ROTATION: 'rotation'
}; };
export default _ol_ViewProperty_;

View File

@@ -1,6 +1,7 @@
/** /**
* @module ol/events/KeyCode * @module ol/events/KeyCode
*/ */
/** /**
* @enum {number} * @enum {number}
* @const * @const

View File

@@ -1,6 +1,7 @@
/** /**
* @module ol/extent/Corner * @module ol/extent/Corner
*/ */
/** /**
* Extent corner. * Extent corner.
* @enum {string} * @enum {string}

View File

@@ -1,6 +1,7 @@
/** /**
* @module ol/extent/Relationship * @module ol/extent/Relationship
*/ */
/** /**
* Relationship to an extent. * Relationship to an extent.
* @enum {number} * @enum {number}

View File

@@ -1,14 +1,13 @@
/** /**
* @module ol/format/IGCZ * @module ol/format/IGCZ
*/ */
/** /**
* IGC altitude/z. One of 'barometric', 'gps', 'none'. * IGC altitude/z. One of 'barometric', 'gps', 'none'.
* @enum {string} * @enum {string}
*/ */
var _ol_format_IGCZ_ = { export default {
BAROMETRIC: 'barometric', BAROMETRIC: 'barometric',
GPS: 'gps', GPS: 'gps',
NONE: 'none' NONE: 'none'
}; };
export default _ol_format_IGCZ_;

View File

@@ -1,17 +1,16 @@
/** /**
* @module ol/geom/GeometryLayout * @module ol/geom/GeometryLayout
*/ */
/** /**
* The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z') * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')
* or measure ('M') coordinate is available. Supported values are `'XY'`, * or measure ('M') coordinate is available. Supported values are `'XY'`,
* `'XYZ'`, `'XYM'`, `'XYZM'`. * `'XYZ'`, `'XYM'`, `'XYZM'`.
* @enum {string} * @enum {string}
*/ */
var GeometryLayout = { export default {
XY: 'XY', XY: 'XY',
XYZ: 'XYZ', XYZ: 'XYZ',
XYM: 'XYM', XYM: 'XYM',
XYZM: 'XYZM' XYZM: 'XYZM'
}; };
export default GeometryLayout;

View File

@@ -1,11 +1,10 @@
/** /**
* @module ol/interaction/Property * @module ol/interaction/Property
*/ */
/** /**
* @enum {string} * @enum {string}
*/ */
var _ol_interaction_Property_ = { export default {
ACTIVE: 'active' ACTIVE: 'active'
}; };
export default _ol_interaction_Property_;

View File

@@ -1,10 +1,11 @@
/** /**
* @module ol/layer/Property * @module ol/layer/Property
*/ */
/** /**
* @enum {string} * @enum {string}
*/ */
var _ol_layer_Property_ = { export default {
OPACITY: 'opacity', OPACITY: 'opacity',
VISIBLE: 'visible', VISIBLE: 'visible',
EXTENT: 'extent', EXTENT: 'extent',
@@ -13,5 +14,3 @@ var _ol_layer_Property_ = {
MIN_RESOLUTION: 'minResolution', MIN_RESOLUTION: 'minResolution',
SOURCE: 'source' SOURCE: 'source'
}; };
export default _ol_layer_Property_;

View File

@@ -1,12 +1,11 @@
/** /**
* @module ol/layer/TileProperty * @module ol/layer/TileProperty
*/ */
/** /**
* @enum {string} * @enum {string}
*/ */
var _ol_layer_TileProperty_ = { export default {
PRELOAD: 'preload', PRELOAD: 'preload',
USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError' USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'
}; };
export default _ol_layer_TileProperty_;

View File

@@ -1,10 +1,11 @@
/** /**
* @module ol/render/canvas/Instruction * @module ol/render/canvas/Instruction
*/ */
/** /**
* @enum {number} * @enum {number}
*/ */
var _ol_render_canvas_Instruction_ = { export default {
BEGIN_GEOMETRY: 0, BEGIN_GEOMETRY: 0,
BEGIN_PATH: 1, BEGIN_PATH: 1,
CIRCLE: 2, CIRCLE: 2,
@@ -19,5 +20,3 @@ var _ol_render_canvas_Instruction_ = {
SET_STROKE_STYLE: 11, SET_STROKE_STYLE: 11,
STROKE: 12 STROKE: 12
}; };
export default _ol_render_canvas_Instruction_;

View File

@@ -1,15 +1,14 @@
/** /**
* @module ol/source/State * @module ol/source/State
*/ */
/** /**
* State of the source, one of 'undefined', 'loading', 'ready' or 'error'. * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.
* @enum {string} * @enum {string}
*/ */
var _ol_source_State_ = { export default {
UNDEFINED: 'undefined', UNDEFINED: 'undefined',
LOADING: 'loading', LOADING: 'loading',
READY: 'ready', READY: 'ready',
ERROR: 'error' ERROR: 'error'
}; };
export default _ol_source_State_;

View File

@@ -1,13 +1,12 @@
/** /**
* @module ol/source/WMTSRequestEncoding * @module ol/source/WMTSRequestEncoding
*/ */
/** /**
* Request encoding. One of 'KVP', 'REST'. * Request encoding. One of 'KVP', 'REST'.
* @enum {string} * @enum {string}
*/ */
var _ol_source_WMTSRequestEncoding_ = { export default {
KVP: 'KVP', // see spec §8 KVP: 'KVP', // see spec §8
REST: 'REST' // see spec §10 REST: 'REST' // see spec §10
}; };
export default _ol_source_WMTSRequestEncoding_;

View File

@@ -1,13 +1,12 @@
/** /**
* @module ol/style/IconAnchorUnits * @module ol/style/IconAnchorUnits
*/ */
/** /**
* Icon anchor units. One of 'fraction', 'pixels'. * Icon anchor units. One of 'fraction', 'pixels'.
* @enum {string} * @enum {string}
*/ */
var _ol_style_IconAnchorUnits_ = { export default {
FRACTION: 'fraction', FRACTION: 'fraction',
PIXELS: 'pixels' PIXELS: 'pixels'
}; };
export default _ol_style_IconAnchorUnits_;

View File

@@ -1,15 +1,14 @@
/** /**
* @module ol/style/IconOrigin * @module ol/style/IconOrigin
*/ */
/** /**
* Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'. * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.
* @enum {string} * @enum {string}
*/ */
var _ol_style_IconOrigin_ = { export default {
BOTTOM_LEFT: 'bottom-left', BOTTOM_LEFT: 'bottom-left',
BOTTOM_RIGHT: 'bottom-right', BOTTOM_RIGHT: 'bottom-right',
TOP_LEFT: 'top-left', TOP_LEFT: 'top-left',
TOP_RIGHT: 'top-right' TOP_RIGHT: 'top-right'
}; };
export default _ol_style_IconOrigin_;

View File

@@ -1,6 +1,7 @@
/** /**
* @module ol/style/TextPlacement * @module ol/style/TextPlacement
*/ */
/** /**
* Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that
* `'line'` requires the underlying geometry to be a {@link ol.geom.LineString}, * `'line'` requires the underlying geometry to be a {@link ol.geom.LineString},
@@ -8,9 +9,7 @@
* {@link ol.geom.MultiPolygon}. * {@link ol.geom.MultiPolygon}.
* @enum {string} * @enum {string}
*/ */
var _ol_style_TextPlacement_ = { export default {
POINT: 'point', POINT: 'point',
LINE: 'line' LINE: 'line'
}; };
export default _ol_style_TextPlacement_;