Skip to content

Commit

Permalink
allow multiple plugin installation (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-zaugg authored Sep 13, 2023
1 parent 3756fbb commit 130bf7d
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 40 deletions.
5 changes: 0 additions & 5 deletions src/components/animations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ import OlAnimationSlide from "./OlAnimationSlide.vue";
import OlAnimationTeleport from "./OlAnimationTeleport.vue";
import OlAnimationZoom from "./OlAnimationZoom.vue";

let installed = false;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-animation-drop", OLAnimationDrop);
app.component("ol-animation-fade", OlAnimationFade);
app.component("ol-animation-feature", OlAnimationFeature);
Expand Down
5 changes: 0 additions & 5 deletions src/components/geometries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ import OlGeomMultiPolygon from "./OlGeomMultiPolygon.vue";
import OlGeomPoint from "./OlGeomPoint.vue";
import OlGeomPolygon from "./OlGeomPolygon.vue";

let installed = false;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-geom-circle", OlGeomCircle);
app.component("ol-geom-line-string", OlGeomLineString);
app.component("ol-geom-multi-line-string", OlGeomMultiLineString);
Expand Down
5 changes: 0 additions & 5 deletions src/components/interaction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ import OlModifyInteraction from "./OlModifyInteraction.vue";
import OlSnapInteraction from "./OlSnapInteraction.vue";
import OlTransformInteraction from "./OlTransformInteraction.vue";

let installed = false;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-interaction-clusterselect", OlClusterSelectInteraction);
app.component("ol-interaction-dragrotate", OlDragRotateInteraction);
app.component("ol-interaction-dragrotatezoom", OlDragRotateZoomInteraction);
Expand Down
5 changes: 0 additions & 5 deletions src/components/layers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ import OlVectorImageLayer from "./OlVectorImageLayer.vue";
import OlWebglPointsLayer from "./OlWebglPointsLayer.vue";
import OlWebglTileLayer from "./OlWebglTileLayer.vue";

let installed = false;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-animated-clusterlayer", OlAnimatedClusterLayer);
app.component("ol-heatmap-layer", OlHeatmapLayer);
app.component("ol-image-layer", OlImageLayer);
Expand Down
5 changes: 0 additions & 5 deletions src/components/map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ import OlOverlay from "./OlOverlay.vue";
import OlProjectionRegister from "./OlProjectionRegister.vue";
import OlView from "./OlView.vue";

let installed = false;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-feature", OlFeature);
app.component("ol-geolocation", OlGeoLocation);
app.component("ol-map", OlMap);
Expand Down
5 changes: 0 additions & 5 deletions src/components/mapControls/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@ import OlZoomControl from "./OlZoomControl.vue";
import OlZoomSliderControl from "./OlZoomSliderControl.vue";
import OlZoomToExtentControl from "./OlZoomToExtentControl.vue";

let installed = false;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-attribution-control", OlAttributionControl);
app.component("ol-fullscreen-control", OlFullScreenControl);
app.component("ol-mouseposition-control", OlMousePositionControl);
Expand Down
5 changes: 0 additions & 5 deletions src/components/sources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ import OlSourceWebglPoints from "./OlSourceWebglPoints.vue";
import OlSourceXYZ from "./OlSourceXYZ.vue";
import OlSourceWMTS from "./OlSourceWMTS.vue";

let installed = false;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-source-bingmaps", OlSourceBingMaps);
app.component("ol-source-cluster", OlSourceCluster);
app.component("ol-source-image-static", OlSourceImageStatic);
Expand Down
5 changes: 0 additions & 5 deletions src/components/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ import OlStyleFlowline from "./OlStyleFlowline.vue";
import type { FeatureLike } from "ol/Feature";
import type { Style } from "ol/style";

let installed = false;

type OverrideStyleFunction = (
feature: FeatureLike,
currentStyle: Style,
resolution: number
) => Style | Style[] | void;

function install(app: App) {
if (installed) return;
installed = true;

app.component("ol-style", OlStyle);
app.component("ol-style-circle", OlStyleCircle);
app.component("ol-style-stroke", OlStyleStroke);
Expand Down

0 comments on commit 130bf7d

Please sign in to comment.