From 239c49c191fca6aadf32d7aac779441f5a428cbf Mon Sep 17 00:00:00 2001 From: Simon Seyock Date: Tue, 20 Sep 2016 14:48:55 +0200 Subject: [PATCH] removed default exports --- src/API.js | 2 +- src/Debug.js | 2 +- src/FeaturePopup.js | 6 ++-- src/FeatureTooltip.js | 2 +- src/G4UMap.js | 10 +++---- src/L10N.js | 4 +-- src/MessageDisplay.js | 2 +- src/Module.js | 2 +- src/Move.js | 2 +- src/Styling.js | 4 +-- src/configurators/ControlFactory.js | 38 ++++++++++++------------ src/configurators/LayerConfigurator.js | 6 ++-- src/configurators/LayerFactory.js | 8 ++--- src/configurators/MapConfigurator.js | 12 ++++---- src/configurators/Positioning.js | 2 +- src/configurators/UIConfigurator.js | 22 +++++++------- src/controls/ActiveGroup.js | 2 +- src/controls/ArrowButtons.js | 4 +-- src/controls/CombinedZoom.js | 4 +-- src/controls/ComposedControl.js | 6 ++-- src/controls/Control.js | 4 +-- src/controls/ControlLogicMixin.js | 2 +- src/controls/ControlRewire.js | 2 +- src/controls/GeoLocationButton.js | 6 ++-- src/controls/HelpButton.js | 6 ++-- src/controls/InfoButton.js | 8 ++--- src/controls/LanguageSwitcherButton.js | 6 ++-- src/controls/LanguageSwitcherMenu.js | 8 ++--- src/controls/LayerSelector.js | 6 ++-- src/controls/LinkButton.js | 4 +-- src/controls/MeasurementButton.js | 4 +-- src/controls/MobileControls.js | 6 ++-- src/controls/PrintButton.js | 4 +-- src/controls/PrintLogo.js | 4 +-- src/controls/ShiftableComposedControl.js | 4 +-- src/controls/WindowDecorator.js | 6 ++-- src/defaultconfig.js | 4 +-- src/html/ButtonBox.js | 2 +- src/html/Dropdown.js | 2 +- src/html/Shield.js | 2 +- src/html/Window.js | 2 +- src/interactions/FeatureSelect.js | 2 +- src/main.js | 2 +- src/sources/QuerySource.js | 4 +-- src/sources/SourceServerVector.js | 4 +-- src/utilities.js | 2 +- 46 files changed, 122 insertions(+), 124 deletions(-) diff --git a/src/API.js b/src/API.js index daeaa6c..ce0e352 100644 --- a/src/API.js +++ b/src/API.js @@ -8,7 +8,7 @@ import { cssClasses, keyCodes } from './globals' * @property {StyleLike} [drawStyle='#drawStyle'] */ -export default class API extends ol.Object { +export class API extends ol.Object { /** * @param {G4UMap} map * @param {object} options diff --git a/src/Debug.js b/src/Debug.js index dd800cb..50c9d44 100644 --- a/src/Debug.js +++ b/src/Debug.js @@ -1,7 +1,7 @@ /** * This class provides different debug behaviour based on the SWITCH_DEBUG build flag */ -export default class Debug { +export class Debug { /** * if in release mode all thrown errors in the callback are catched and the program is continued * @param {function} cb diff --git a/src/FeaturePopup.js b/src/FeaturePopup.js index 210523a..a631fb1 100644 --- a/src/FeaturePopup.js +++ b/src/FeaturePopup.js @@ -1,10 +1,10 @@ import ol from 'openlayers' import $ from 'jquery' -import Window from './html/Window' +import {Window} from './html/Window' import {cssClasses} from './globals' import {finishAllImages} from './utilities' -import Debug from './Debug' +import {Debug} from './Debug' import '../less/featurepopup.less' @@ -27,7 +27,7 @@ import '../less/featurepopup.less' /** * Displays a Popup bound to a geographical position via an ol.Overlay */ -export default class FeaturePopup extends ol.Object { +export class FeaturePopup extends ol.Object { /** * @param {FeaturePopupOptions} options */ diff --git a/src/FeatureTooltip.js b/src/FeatureTooltip.js index 758955a..eac5b1f 100644 --- a/src/FeatureTooltip.js +++ b/src/FeatureTooltip.js @@ -15,7 +15,7 @@ import '../less/tooltip.less' /** * Displays a tooltip if a feature with a name is hovered. */ -export default class FeatureTooltip { +export class FeatureTooltip { /** * @param {FeatureTooltipOptions} [options={}] */ diff --git a/src/G4UMap.js b/src/G4UMap.js index 560dc5e..d3c0fc6 100644 --- a/src/G4UMap.js +++ b/src/G4UMap.js @@ -4,16 +4,16 @@ import $ from 'jquery' import stripJsonComments from 'strip-json-comments' import 'file?name=licenses/strip-json-comments.[ext]!strip-json-comments/license' -import MapConfigurator from './configurators/MapConfigurator' +import {MapConfigurator} from './configurators/MapConfigurator' import './openlayersInjections' -import L10N from './L10N' +import {L10N} from './L10N' import {mergeWithDefaults} from './utilitiesObject' import {cssClasses} from './globals' -import defaults from './defaultconfig' +import {defaults} from './defaultconfig' -import Debug from './Debug' +import {Debug} from './Debug' import '../less/map.less' @@ -39,7 +39,7 @@ import '../less/map.less' * @fires 'change:ready:ui' * @fires 'change:ready:layers' */ -export default class G4UMap extends ol.Map { +export class G4UMap extends ol.Map { /** * @param {HTMLElement|jQuery|string} target element or id of an element * @param {MapConfig|string} configOrFileName diff --git a/src/L10N.js b/src/L10N.js index 2398176..3814914 100644 --- a/src/L10N.js +++ b/src/L10N.js @@ -1,7 +1,7 @@ import $ from 'jquery' import stripJsonComments from 'strip-json-comments' -import Debug from './Debug' +import {Debug} from './Debug' import { decodeEntities } from './utilities' /** @@ -20,7 +20,7 @@ import { decodeEntities } from './utilities' * This class localizes texts by either selecting one from a dictionary (asynchron loaded JSON File) or choosing the * right string from a selection. */ -export default class L10N { +export class L10N { /** * @param {L10NOptions} options */ diff --git a/src/MessageDisplay.js b/src/MessageDisplay.js index 34ef83a..4f0c96f 100644 --- a/src/MessageDisplay.js +++ b/src/MessageDisplay.js @@ -33,7 +33,7 @@ import { decodeEntities } from './utilities' /** * Displays Messages */ -export default class MessageDisplay { +export class MessageDisplay { /** * @param {jQuery} $element * @param {MessageConstructorOptions} options diff --git a/src/Module.js b/src/Module.js index bb845b2..e341801 100644 --- a/src/Module.js +++ b/src/Module.js @@ -1,7 +1,7 @@ /** * Base class for modules. It shows all usable methods. */ -export default class Module { +export class Module { /** * @param {G4UMap} map */ diff --git a/src/Move.js b/src/Move.js index 4b59c14..55a9402 100644 --- a/src/Move.js +++ b/src/Move.js @@ -19,7 +19,7 @@ import ol from 'openlayers' /** * Moves the map. Uses animations if desired. */ -export default class Move { +export class Move { /** * @param {MoveOptions} options */ diff --git a/src/Styling.js b/src/Styling.js index b9419dc..6413a83 100644 --- a/src/Styling.js +++ b/src/Styling.js @@ -3,7 +3,7 @@ import $ from 'jquery' import { copyDeep, copy } from './utilitiesObject' import { checkFor } from './utilities' -import Debug from './Debug' +import {Debug} from './Debug' import {parseCSSColor} from 'csscolorparser' @@ -60,7 +60,7 @@ function mergeStyleConfigs (configTarget, configSource) { /** * This class coordinates the styling. */ -export default class Styling { +export class Styling { /** * @param {Object} [options] * @param {Object} [options.styleConfigMap] diff --git a/src/configurators/ControlFactory.js b/src/configurators/ControlFactory.js index 1bf1fc2..16bfa1f 100644 --- a/src/configurators/ControlFactory.js +++ b/src/configurators/ControlFactory.js @@ -2,29 +2,29 @@ import ol from 'openlayers' import { Attribution, OverviewMap, ScaleLine, MousePosition } from '../controls/ControlRewire' -import ComposedControl from '../controls/ComposedControl' -import ArrowButtons from '../controls/ArrowButtons' -import CombinedZoom from '../controls/CombinedZoom' -import LayerSelector from '../controls/LayerSelector' -import GeolocationButton from '../controls/GeoLocationButton' -import MeasurementButton from '../controls/MeasurementButton' -import LanguageSwitcherButton from '../controls/LanguageSwitcherButton' -import LanguageSwitcherMenu from '../controls/LanguageSwitcherMenu' -import MobileControls from '../controls/MobileControls' -import InfoButton from '../controls/InfoButton' -import LinkButton from '../controls/LinkButton' -import PrintButton from '../controls/PrintButton' -import PrintLogo from '../controls/PrintLogo' -import HelpButton from '../controls/HelpButton' -import WindowDecorator from '../controls/WindowDecorator' +import {ComposedControl} from '../controls/ComposedControl' +import {ArrowButtons} from '../controls/ArrowButtons' +import {CombinedZoom} from '../controls/CombinedZoom' +import {LayerSelector} from '../controls/LayerSelector' +import {GeolocationButton} from '../controls/GeoLocationButton' +import {MeasurementButton} from '../controls/MeasurementButton' +import {LanguageSwitcherButton} from '../controls/LanguageSwitcherButton' +import {LanguageSwitcherMenu} from '../controls/LanguageSwitcherMenu' +import {MobileControls} from '../controls/MobileControls' +import {InfoButton} from '../controls/InfoButton' +import {LinkButton} from '../controls/LinkButton' +import {PrintButton} from '../controls/PrintButton' +import {PrintLogo} from '../controls/PrintLogo' +import {HelpButton} from '../controls/HelpButton' +import {WindowDecorator} from '../controls/WindowDecorator' import { asObject, checkFor } from '../utilities' import { copyDeep } from '../utilitiesObject' -import G4UMap from '../G4UMap' +import {G4UMap} from '../G4UMap' -import Debug from '../Debug' -import ActiveGroup from '../controls/ActiveGroup' +import {Debug} from '../Debug' +import {ActiveGroup} from '../controls/ActiveGroup' /** * @typedef {Object} ControlFactoryOptions @@ -36,7 +36,7 @@ import ActiveGroup from '../controls/ActiveGroup' * A Factory that takes a control config as an object and returns the correspondig control. Modules can expand the * functionality of this class via the createControl method */ -export default class ControlFactory { +export class ControlFactory { /** * @param {ControlFactoryOptions} options * @public diff --git a/src/configurators/LayerConfigurator.js b/src/configurators/LayerConfigurator.js index a7242ee..1871287 100644 --- a/src/configurators/LayerConfigurator.js +++ b/src/configurators/LayerConfigurator.js @@ -3,13 +3,13 @@ import ol from 'openlayers' import {GroupLayer} from '../layers/GroupLayer' import { copyDeep } from '../utilitiesObject' import { checkFor } from '../utilities' -import Debug from '../Debug' -import LayerFactory from './LayerFactory' +import {Debug} from '../Debug' +import {LayerFactory} from './LayerFactory' /** * This is part of the MapConfigurator class */ -export default class LayerConfigurator { +export class LayerConfigurator { /** * @param {G4UMap} map * @public diff --git a/src/configurators/LayerFactory.js b/src/configurators/LayerFactory.js index a3e9a75..f0ba6df 100644 --- a/src/configurators/LayerFactory.js +++ b/src/configurators/LayerFactory.js @@ -5,12 +5,12 @@ import {EmptyBaseLayer} from '../layers/EmptyBaseLayer' import {BaseLayerTile} from '../layers/BaseLayerTile' import {GroupLayer} from '../layers/GroupLayer' import {VectorLayer} from '../layers/VectorLayer' -import SourceServerVector from '../sources/SourceServerVector' -import QuerySource from '../sources/QuerySource' +import {SourceServerVector} from '../sources/SourceServerVector' +import {QuerySource} from '../sources/QuerySource' import { copyDeep, take } from '../utilitiesObject' import { checkFor, addProxy } from '../utilities' -import Debug from '../Debug' +import {Debug} from '../Debug' export const SuperType = { BASELAYER: 'baseLayer', @@ -66,7 +66,7 @@ export const LayerType = { /** * This class constructs a layer according to the given {{LayerOptions}} */ -export default class LayerFactory { +export class LayerFactory { /** * @param {G4UMap} map */ diff --git a/src/configurators/MapConfigurator.js b/src/configurators/MapConfigurator.js index 1596355..e1783d8 100644 --- a/src/configurators/MapConfigurator.js +++ b/src/configurators/MapConfigurator.js @@ -5,16 +5,16 @@ import 'file?name=licenses/PROJ4JS.txt!proj4/LICENSE.md' ol.proj.setProj4(proj4) -import Styling from '../Styling' -import LayerConfigurator from './LayerConfigurator' -import UIConfigurator from './UIConfigurator' +import {Styling} from '../Styling' +import {LayerConfigurator} from './LayerConfigurator' +import {UIConfigurator} from './UIConfigurator' import { copyDeep } from '../utilitiesObject' import { checkFor } from '../utilities' -import API from '../API' +import {API} from '../API' -import Debug from '../Debug' +import {Debug} from '../Debug' /** * @typedef {Object} MapConfig @@ -88,7 +88,7 @@ import Debug from '../Debug' * configureMap initializes the map and can only be called once. * it delegates the configureUI and configureLayers to the {{UIConfigurator}} and {{LayerConfigurator}} classes. */ -export default class MapConfigurator { +export class MapConfigurator { /** * @param {G4UMap} map * @public diff --git a/src/configurators/Positioning.js b/src/configurators/Positioning.js index 2b339de..86137ff 100644 --- a/src/configurators/Positioning.js +++ b/src/configurators/Positioning.js @@ -34,7 +34,7 @@ import { cssClasses } from '../globals' * @property {HTMLElement} viewport */ -export default class Positioning { +export class Positioning { /** * @param {PositioningOptions} options */ diff --git a/src/configurators/UIConfigurator.js b/src/configurators/UIConfigurator.js index 1b5f4f7..035c4b1 100644 --- a/src/configurators/UIConfigurator.js +++ b/src/configurators/UIConfigurator.js @@ -1,27 +1,27 @@ import ol from 'openlayers' import $ from 'jquery' -import Positioning from './Positioning' +import {Positioning} from './Positioning' -import Move from '../Move' -import FeaturePopup from '../FeaturePopup' -import FeatureTooltip from '../FeatureTooltip' +import {Move} from '../Move' +import {FeaturePopup} from '../FeaturePopup' +import {FeatureTooltip} from '../FeatureTooltip' -import Shield from '../html/Shield' +import {Shield} from '../html/Shield' -import ControlFactory from './ControlFactory' +import {ControlFactory} from './ControlFactory' -import Debug from '../Debug' +import {Debug} from '../Debug' import {copyDeep} from '../utilitiesObject' import {checkFor, getConfig, urlDirname, urlJoin} from '../utilities' -import MeasurementButton from '../controls/MeasurementButton' -import PrintButton from '../controls/PrintButton' +import {MeasurementButton} from '../controls/MeasurementButton' +import {PrintButton} from '../controls/PrintButton' import {cssClasses} from '../globals' -import FeatureSelect from '../interactions/FeatureSelect' +import {FeatureSelect} from '../interactions/FeatureSelect' import {parseCSSColor} from 'csscolorparser' import {FunctionCallBuffer} from '../FunctionCallBuffer' @@ -29,7 +29,7 @@ import {FunctionCallBuffer} from '../FunctionCallBuffer' /** * This class configures the UI of a map according to its mapconfig */ -export default class UIConfigurator { +export class UIConfigurator { /** * @param {G4UMap} map */ diff --git a/src/controls/ActiveGroup.js b/src/controls/ActiveGroup.js index 7814c00..448df72 100644 --- a/src/controls/ActiveGroup.js +++ b/src/controls/ActiveGroup.js @@ -3,7 +3,7 @@ * This specified and configured via a property 'activeGroup' in the config object of the control and * a matching string for all controls which should be in this group */ -export default class ActiveGroup { +export class ActiveGroup { /** * @param {Control[]} controls */ diff --git a/src/controls/ArrowButtons.js b/src/controls/ArrowButtons.js index 56da978..246ca54 100644 --- a/src/controls/ArrowButtons.js +++ b/src/controls/ArrowButtons.js @@ -2,7 +2,7 @@ import ol from 'openlayers' import $ from 'jquery' import { merge } from '../utilitiesObject' -import Control from './Control' +import {Control} from './Control' import {addTooltip} from '../html/html' import '../../less/arrowbuttons.less' @@ -26,7 +26,7 @@ import '../../less/arrowbuttons.less' * The Options are passed as an Object (e.g. ``{ initCenter : map.getView().getCenter(), * initZoom : map.getView().getZoom() }``. */ -export default class ArrowButtons extends Control { +export class ArrowButtons extends Control { /** * @param {ArrowButtonOptions} [options={}] */ diff --git a/src/controls/CombinedZoom.js b/src/controls/CombinedZoom.js index a7f370d..d658194 100644 --- a/src/controls/CombinedZoom.js +++ b/src/controls/CombinedZoom.js @@ -1,6 +1,6 @@ import $ from 'jquery' -import ComposedControl from './ComposedControl' +import {ComposedControl} from './ComposedControl' import { Zoom, ZoomSlider } from './ControlRewire' import { cssClasses } from '../globals' import { copy } from '../utilitiesObject' @@ -20,7 +20,7 @@ import '../../less/zoom.less' /** * This combines the two zoom controls (zoomslider and zoombuttons) */ -export default class CombinedZoom extends ComposedControl { +export class CombinedZoom extends ComposedControl { /** * @param {CombinedZoomOptions} [options={}] */ diff --git a/src/controls/ComposedControl.js b/src/controls/ComposedControl.js index 6706f13..971ac90 100644 --- a/src/controls/ComposedControl.js +++ b/src/controls/ComposedControl.js @@ -1,7 +1,7 @@ import $ from 'jquery' -import Window from '../html/Window' -import Control from './Control' +import {Window} from '../html/Window' +import {Control} from './Control' import {cssClasses} from '../globals' import '../../less/toolbox.less' @@ -17,7 +17,7 @@ import '../../less/layermenu.less' * other controls. It makes use of the composite pattern. */ -export default class ComposedControl extends Control { +export class ComposedControl extends Control { /** * @param {ComposedControlOptions} [options={}] */ diff --git a/src/controls/Control.js b/src/controls/Control.js index 16d452d..d757f57 100644 --- a/src/controls/Control.js +++ b/src/controls/Control.js @@ -1,6 +1,6 @@ import ol from 'openlayers' import { mixin } from '../utilities' -import ControlLogicMixin from './ControlLogicMixin' +import {ControlLogicMixin} from './ControlLogicMixin' /** * @typedef {object} g4uControlOptions @@ -28,4 +28,4 @@ import ControlLogicMixin from './ControlLogicMixin' * @extends {ol.control.Control} */ -export default mixin(ol.control.Control, ControlLogicMixin) +export const Control = mixin(ol.control.Control, ControlLogicMixin) diff --git a/src/controls/ControlLogicMixin.js b/src/controls/ControlLogicMixin.js index e299cdb..97f6b1f 100644 --- a/src/controls/ControlLogicMixin.js +++ b/src/controls/ControlLogicMixin.js @@ -5,7 +5,7 @@ import {cssClasses} from '../globals' * This class contains logic which should be part of any Control in the Software. Any custom controls * should inherit from Control which inherits from this class AND from ol.cont */ -export default class ControlLogicMixin { +export class ControlLogicMixin { /** * @param {g4uControlOptions} options */ diff --git a/src/controls/ControlRewire.js b/src/controls/ControlRewire.js index a1df4c9..3627629 100644 --- a/src/controls/ControlRewire.js +++ b/src/controls/ControlRewire.js @@ -2,7 +2,7 @@ import ol from 'openlayers' import $ from 'jquery' import {mixin, recursiveSelect} from '../utilities' -import ControlLogicMixin from './ControlLogicMixin' +import {ControlLogicMixin} from './ControlLogicMixin' import {cssClasses} from '../globals' import '../../less/attribution.less' diff --git a/src/controls/GeoLocationButton.js b/src/controls/GeoLocationButton.js index 4ffb4ab..bfe9bd7 100644 --- a/src/controls/GeoLocationButton.js +++ b/src/controls/GeoLocationButton.js @@ -1,10 +1,10 @@ import ol from 'openlayers' import $ from 'jquery' -import Control from './Control' +import {Control} from './Control' import { addTooltip } from '../html/html' import {VectorLayer} from '../layers/VectorLayer' -import MessageDisplay from '../MessageDisplay' +import {MessageDisplay} from '../MessageDisplay' import {cssClasses} from '../globals' import '../../less/geolocation.less' @@ -19,7 +19,7 @@ import '../../less/geolocation.less' /** * This class provides a button to center the view on your current geoposition. */ -export default class GeolocationButton extends Control { +export class GeolocationButton extends Control { /** * @param {GeolocationButtonOptions} [options={}] */ diff --git a/src/controls/HelpButton.js b/src/controls/HelpButton.js index fa694da..f4a479a 100644 --- a/src/controls/HelpButton.js +++ b/src/controls/HelpButton.js @@ -1,9 +1,9 @@ import $ from 'jquery' -import Control from './Control' +import {Control} from './Control' import { checkFor, even, finishAllImages } from '../utilities' import stripJsonComments from 'strip-json-comments' -import Debug from '../Debug' +import {Debug} from '../Debug' import '../../less/helpbutton.less' import {copyDeep} from '../utilitiesObject' @@ -17,7 +17,7 @@ import {copyDeep} from '../utilitiesObject' /** * Shows a help button. Loads an json file with the helptexts and images from the server. */ -export default class HelpButton extends Control { +export class HelpButton extends Control { /** * @param {HelpButtonOptions} options */ diff --git a/src/controls/InfoButton.js b/src/controls/InfoButton.js index 1a8395e..a552b37 100644 --- a/src/controls/InfoButton.js +++ b/src/controls/InfoButton.js @@ -2,12 +2,12 @@ import $ from 'jquery' import { addProxy } from '../utilities' import { Attribution } from './ControlRewire' -import Control from './Control' +import {Control} from './Control' import '../../less/infobutton.less' /** - * @typedef {g4uControlOptions} InfoPageOptions + * @typedef {g4uControlOptions} InfoButtonOptions * @property {string} contentURL url providing content to be shown * @property {boolean} [useProxy] * @property {string} [proxy] @@ -16,9 +16,9 @@ import '../../less/infobutton.less' /** * This control opens a window with showing some specified info text */ -export default class InfoPage extends Control { +export class InfoButton extends Control { /** - * @param {InfoPageOptions} options + * @param {InfoButtonOptions} options */ constructor (options = {}) { options.className = options.className || 'g4u-infobutton' diff --git a/src/controls/LanguageSwitcherButton.js b/src/controls/LanguageSwitcherButton.js index d3a7e0c..0bbcdb9 100644 --- a/src/controls/LanguageSwitcherButton.js +++ b/src/controls/LanguageSwitcherButton.js @@ -1,8 +1,8 @@ import $ from 'jquery' -import Control from './Control' +import {Control} from './Control' import { addTooltip } from '../html/html' -import Debug from '../Debug' +import {Debug} from '../Debug' import '../../less/languageControls.less' @@ -14,7 +14,7 @@ import '../../less/languageControls.less' * A button to switch the language that is being used. * Works if only two languages are configured. */ -export default class LanguageSwitcherButton extends Control { +export class LanguageSwitcherButton extends Control { /** * @param {LanguageSwitcherButtonOptions} options */ diff --git a/src/controls/LanguageSwitcherMenu.js b/src/controls/LanguageSwitcherMenu.js index 1645e2b..8a5faf6 100644 --- a/src/controls/LanguageSwitcherMenu.js +++ b/src/controls/LanguageSwitcherMenu.js @@ -1,10 +1,10 @@ import $ from 'jquery' -import Dropdown from '../html/Dropdown' +import {Dropdown} from '../html/Dropdown' import { addTooltip } from '../html/html' -import Control from './Control' +import {Control} from './Control' import { cssClasses, keyCodes } from '../globals' -import Debug from '../Debug' +import {Debug} from '../Debug' import '../../less/languageControls.less' @@ -15,7 +15,7 @@ import '../../less/languageControls.less' /** * A button to switch the language that is being used. */ -export default class LanguageSwitcherMenu extends Control { +export class LanguageSwitcherMenu extends Control { /** * @param {LanguageSwitcherMenuOptions} options */ diff --git a/src/controls/LayerSelector.js b/src/controls/LayerSelector.js index 32e3530..fcdbb35 100644 --- a/src/controls/LayerSelector.js +++ b/src/controls/LayerSelector.js @@ -2,8 +2,8 @@ import $ from 'jquery' import ol from 'openlayers' import {GroupLayer} from '../layers/GroupLayer' -import ButtonBox from '../html/ButtonBox' -import Control from './Control' +import {ButtonBox} from '../html/ButtonBox' +import {Control} from './Control' import { offset } from '../utilities' import {cssClasses} from '../globals' @@ -23,7 +23,7 @@ import '../../less/layerselector.less' * This control shows Buttons to let you select the layer you want to see on the map. * It supports categories and nested categories - each {GroupLayer}-Object will be interpreted as a category. */ -export default class LayerSelector extends Control { +export class LayerSelector extends Control { /** * @param {LayerSelectorOptions} options */ diff --git a/src/controls/LinkButton.js b/src/controls/LinkButton.js index 5a1a95c..658ec18 100644 --- a/src/controls/LinkButton.js +++ b/src/controls/LinkButton.js @@ -1,6 +1,6 @@ import $ from 'jquery' -import Control from './Control' +import {Control} from './Control' import { addTooltip } from '../html/html' import {cssClasses} from '../globals' @@ -15,7 +15,7 @@ import '../../less/linkbutton.less' /** * provides a button which links to another page */ -export default class LinkButton extends Control { +export class LinkButton extends Control { /** * @param {LinkButtonOptions} options */ diff --git a/src/controls/MeasurementButton.js b/src/controls/MeasurementButton.js index ac1737a..0aa00f0 100644 --- a/src/controls/MeasurementButton.js +++ b/src/controls/MeasurementButton.js @@ -1,7 +1,7 @@ import ol from 'openlayers' import $ from 'jquery' -import Control from './Control' +import {Control} from './Control' import { cssClasses, keyCodes } from '../globals' import {VectorLayer} from '../layers/VectorLayer' @@ -19,7 +19,7 @@ import '../../less/measurement.less' /** * Enables the user to draw lines or polygons on the map and displays the length or area. */ -export default class MeasurementButton extends Control { +export class MeasurementButton extends Control { /** * @param {MeasurementButtonOptions} options */ diff --git a/src/controls/MobileControls.js b/src/controls/MobileControls.js index 66ab3da..08fc23e 100644 --- a/src/controls/MobileControls.js +++ b/src/controls/MobileControls.js @@ -1,14 +1,14 @@ import $ from 'jquery' -import ShiftableComposedControl from './ShiftableComposedControl' -import WindowDecorator from './WindowDecorator' +import {ShiftableComposedControl} from './ShiftableComposedControl' +import {WindowDecorator} from './WindowDecorator' import '../../less/mobilecontrols.less' /** * This class represents the mobile menu containing all the controls. */ -export default class MobileControls extends ShiftableComposedControl { +export class MobileControls extends ShiftableComposedControl { /** * @param {ShiftableComposedControlOptions} options */ diff --git a/src/controls/PrintButton.js b/src/controls/PrintButton.js index 32c7a97..c5d4791 100644 --- a/src/controls/PrintButton.js +++ b/src/controls/PrintButton.js @@ -1,12 +1,12 @@ import $ from 'jquery' -import Control from './Control' +import {Control} from './Control' import { addTooltip } from '../html/html' import {cssClasses} from '../globals' import '../../less/printbutton.less' -export default class PrintButton extends Control { +export class PrintButton extends Control { /** * @param {g4uControlOptions} options */ diff --git a/src/controls/PrintLogo.js b/src/controls/PrintLogo.js index 0eae07b..5b9046e 100644 --- a/src/controls/PrintLogo.js +++ b/src/controls/PrintLogo.js @@ -1,6 +1,6 @@ import $ from 'jquery' -import Control from './Control' +import {Control} from './Control' import '../../less/printlogo.less' @@ -15,7 +15,7 @@ import '../../less/printlogo.less' /** * This is a class which provides a printLogo on the map. */ -export default class PrintLogo extends Control { +export class PrintLogo extends Control { /** * @param {PrintLogoOptions} options */ diff --git a/src/controls/ShiftableComposedControl.js b/src/controls/ShiftableComposedControl.js index e1aa6d2..dc8a701 100644 --- a/src/controls/ShiftableComposedControl.js +++ b/src/controls/ShiftableComposedControl.js @@ -1,6 +1,6 @@ import $ from 'jquery' -import ComposedControl from './ComposedControl' +import {ComposedControl} from './ComposedControl' import { cssClasses } from '../globals' /** @@ -11,7 +11,7 @@ import { cssClasses } from '../globals' /** * This class displays only a given amount of the containing controls and arrows to switch through these */ -export default class ShiftableComposedControl extends ComposedControl { +export class ShiftableComposedControl extends ComposedControl { /** * @param {ShiftableComposedControlOptions} options */ diff --git a/src/controls/WindowDecorator.js b/src/controls/WindowDecorator.js index 01d9ac7..b47bb2d 100644 --- a/src/controls/WindowDecorator.js +++ b/src/controls/WindowDecorator.js @@ -1,7 +1,7 @@ import $ from 'jquery' -import Control from './Control' -import Window from '../html/Window' +import {Control} from './Control' +import {Window} from '../html/Window' import { addTooltip } from '../html/html' import {cssClasses} from '../globals' @@ -16,7 +16,7 @@ import '../../less/windowdecorator.less' * This class provides an easy wrap around an control to provide a button to open the control inside of a window. * If the child control has a setActive method it is called upon opening and closing the window. */ -export default class WindowDecorator extends Control { +export class WindowDecorator extends Control { /** * @param {WindowDecoratorOptions} options */ diff --git a/src/defaultconfig.js b/src/defaultconfig.js index 1bc5153..a6c2382 100644 --- a/src/defaultconfig.js +++ b/src/defaultconfig.js @@ -5,7 +5,7 @@ // Element is a Keyword for the composition of config objects. Every attribute with 'Element' in its name // isn't copied but used as a default case for elements of an array with the same name (-Element) -let defaults = {} +export const defaults = {} defaults.baselayer = { title: { @@ -91,5 +91,3 @@ defaults.config = { } } } - -export default defaults diff --git a/src/html/ButtonBox.js b/src/html/ButtonBox.js index 0c18e29..c990d26 100644 --- a/src/html/ButtonBox.js +++ b/src/html/ButtonBox.js @@ -20,7 +20,7 @@ import { cssClasses } from '../globals' * It can also marks one or multiple element in the tree to be active (same classname is needed, too). * After a ButtonBox has been added all child elements the method finish should be called. */ -export default class ButtonBox extends ol.Object { +export class ButtonBox extends ol.Object { /** * @param {ButtonBoxOptions} [options={}] */ diff --git a/src/html/Dropdown.js b/src/html/Dropdown.js index b069faa..bd524a2 100644 --- a/src/html/Dropdown.js +++ b/src/html/Dropdown.js @@ -17,7 +17,7 @@ import '../../less/dropdown.less' * @fires 'leave:backwards' This event is raised if the dropdown is left via the up arrow or shift+tab * @fires 'leave:forwards' This event is raised if the dropdown is left via the down arrow or tab */ -export default class Dropdown extends ol.Object { +export class Dropdown extends ol.Object { /** * @param {DropdownOptions} [options={}] */ diff --git a/src/html/Shield.js b/src/html/Shield.js index 311ea0e..8bc9d84 100644 --- a/src/html/Shield.js +++ b/src/html/Shield.js @@ -23,7 +23,7 @@ import '../../less/shield.less' * A shield that sets itself in front of all other elements in a context if activated, hides itself if deactivated. * It can get another element in front of it (Attention: it gets removed from its context temporarly) */ -export default class Shield extends ol.Object { +export class Shield extends ol.Object { /** * @param {ShieldOptions} options */ diff --git a/src/html/Window.js b/src/html/Window.js index 666e150..ad24181 100644 --- a/src/html/Window.js +++ b/src/html/Window.js @@ -23,7 +23,7 @@ import '../../less/window.less' /** * A HTML Window */ -export default class Window extends ol.Object { +export class Window extends ol.Object { /** * @param {WindowOptions} options */ diff --git a/src/interactions/FeatureSelect.js b/src/interactions/FeatureSelect.js index ef3f895..7695973 100644 --- a/src/interactions/FeatureSelect.js +++ b/src/interactions/FeatureSelect.js @@ -5,7 +5,7 @@ import sortBy from 'lodash/sortBy' * This interaction is a little further customized select interaction. * Selected features get sorted by geometry type. */ -export default class FeatureSelect extends ol.interaction.Select { +export class FeatureSelect extends ol.interaction.Select { /** * @param {object} [options={}] */ diff --git a/src/main.js b/src/main.js index 5f53461..df276e4 100644 --- a/src/main.js +++ b/src/main.js @@ -11,7 +11,7 @@ import 'file?name=images/[name].[ext]!../images/g4u-logo.png' window.ol = window.ol || ol window.$ = window.$ || $ -import G4UMap from './G4UMap' +import {G4UMap} from './G4UMap' import 'polyfill!requestAnimationFrame,cancelAnimationFrame' diff --git a/src/sources/QuerySource.js b/src/sources/QuerySource.js index 6ab80aa..a30d420 100644 --- a/src/sources/QuerySource.js +++ b/src/sources/QuerySource.js @@ -1,4 +1,4 @@ -import SourceServerVector from './SourceServerVector' +import {SourceServerVector} from './SourceServerVector' import { expandTemplate } from '../utilities' /** @@ -9,7 +9,7 @@ import { expandTemplate } from '../utilities' /** * A source for a VectorLayer which address is controlled by the urlapi and which is not shown in the LayerSelector */ -export default class QuerySource extends SourceServerVector { +export class QuerySource extends SourceServerVector { /** * @param {QuerySourceOptions} options */ diff --git a/src/sources/SourceServerVector.js b/src/sources/SourceServerVector.js index e8374d4..81356bd 100644 --- a/src/sources/SourceServerVector.js +++ b/src/sources/SourceServerVector.js @@ -4,7 +4,7 @@ import $ from 'jquery' import { addProxy } from '../utilities' import { copy } from '../utilitiesObject' -import Debug from '../Debug' +import {Debug} from '../Debug' /** * @typedef {olx.source.VectorOptions} SourceServerVectorOptions @@ -33,7 +33,7 @@ import Debug from '../Debug' * * This class defines a custom loader function which makes it possible to use different loading strategies. */ -export default class SourceServerVector extends ol.source.Vector { +export class SourceServerVector extends ol.source.Vector { /** * @param {SourceServerVectorOptions} [options={}] */ diff --git a/src/utilities.js b/src/utilities.js index f0ad43f..9aca6ce 100644 --- a/src/utilities.js +++ b/src/utilities.js @@ -10,7 +10,7 @@ import 'polyfill!Object.getOwnPropertyNames' import 'core-js/library/fn/object/get-own-property-descriptor' import 'polyfill!Object.getPrototypeOf' -import Debug from './Debug' +import {Debug} from './Debug' /** * Checks whether an argument can be interpreted as an even integer