Skip to content

Commit

Permalink
Merge pull request #2710 from DenverCoder544/publisher_tools_reactifi…
Browse files Browse the repository at this point in the history
…cation_zoombar

Publisher tools reactification zoombar
  • Loading branch information
ZakarFin authored Oct 31, 2024
2 parents 54daedb + 71144ec commit 6663029
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 59 deletions.
1 change: 0 additions & 1 deletion bundles/framework/publisher2/resources/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Oskari.registerLocalization(
"tooltip": "Select available map tools. Check a placement in the map preview.",
"AnnouncementsPlugin": "Announcements",
"TimeseriesControlPlugin": "Time series player",
"Portti2Zoombar": "Zoom bar",
"ControlsPlugin": "Pan by mouse",
"SearchPlugin": "Place search",
"FeaturedataPlugin": "Feature data",
Expand Down
1 change: 0 additions & 1 deletion bundles/framework/publisher2/resources/locale/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Oskari.registerLocalization(
"tooltip": "Valitse kartalla käytettävissä olevat työkalut. Tarkista asettelu esikatselukartasta.",
"AnnouncementsPlugin": "Ilmoitukset",
"TimeseriesControlPlugin": "Aikasarjatoistin",
"Portti2Zoombar": "Mittakaavasäädin",
"ControlsPlugin": "Kartan liikuttaminen hiirellä raahaamalla",
"SearchPlugin": "Osoite- ja paikannimihaku",
"FeaturedataPlugin": "Kohdetietotaulukko",
Expand Down
1 change: 0 additions & 1 deletion bundles/framework/publisher2/resources/locale/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Oskari.registerLocalization(
"label": "Outils",
"tooltip": "Sélectionner les outils de carte accessibles. Consulter une mise en place dans la prévisualisation de carte.",
"TimeseriesControlPlugin": "Lecteur chronologique",
"Portti2Zoombar": "Barre de zoom",
"ControlsPlugin": "Panoramiser avec la souris",
"SearchPlugin": "Recherche de lieu",
"FeaturedataPlugin": "Données de fonctionnalité",
Expand Down
1 change: 0 additions & 1 deletion bundles/framework/publisher2/resources/locale/is.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Oskari.registerLocalization(
"maptools": {
"label": "Tól",
"tooltip": "Velja tiltæk kortatól. Athugaðu staðsetningu við forskoðun korts.",
"Portti2Zoombar": "Þysjunarstika",
"ControlsPlugin": "Hliðra með mús",
"SearchPlugin": "Leit eftir stað",
"FeaturedataPlugin": "Fitjugögn",
Expand Down
1 change: 0 additions & 1 deletion bundles/framework/publisher2/resources/locale/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ Oskari.registerLocalization(
"label": "Инструменты",
"tooltip": "Выберите доступные инструменты карты. Проверка размещения в окне предварительного просмотра карты.",
"TimeseriesControlPlugin": "Временные ряды",
"Portti2Zoombar": "Панель увеличения",
"ControlsPlugin": "Панорамирование мышью",
"SearchPlugin": "Поиск места",
"FeaturedataPlugin": "Данные объекта",
Expand Down
1 change: 0 additions & 1 deletion bundles/framework/publisher2/resources/locale/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Oskari.registerLocalization(
"tooltip": "Välj verktygen som visas på kartan. Du kan se deras placering på den förhandsvisade kartan.",
"AnnouncementsPlugin": "Aviseringar",
"TimeseriesControlPlugin": "Tidseriespelare",
"Portti2Zoombar": "Skalans glidreglage",
"ControlsPlugin": "Flytta kartvyn med musen",
"SearchPlugin": "Adress- och ortnamnssökning",
"FeaturedataPlugin": "Objektuppgifter",
Expand Down
43 changes: 0 additions & 43 deletions bundles/framework/publisher2/tools/ZoombarTool.js

This file was deleted.

55 changes: 55 additions & 0 deletions bundles/mapping/mapmodule/plugin/zoombar/publisher/ZoombarTool.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { AbstractPublisherTool } from '../../../../../framework/publisher2/tools/AbstractPublisherTool';

class ZoombarTool extends AbstractPublisherTool {
constructor (...args) {
super(...args);
this.index = 1;
this.group = 'additional';
};

/**
* Get tool object.
* @method getTool
*
* @returns {Object} tool description
*/
getTool () {
return {
id: 'Oskari.mapframework.bundle.mapmodule.plugin.Portti2Zoombar',
title: Oskari.getMsg('MapModule', 'publisherTools.Zoombar.toolLabel'),
config: this.state.pluginConfig || {}
};
};

/**
* Get values.
* @method getValues
* @public
*
* @returns {Object} tool value object
*/
getValues () {
if (!this.isEnabled()) {
return null;
}
return {
configuration: {
mapfull: {
conf: {
plugins: [{ id: this.getTool().id, config: this.getPlugin().getConfig() }]
}
}
}
};
};
}

// Attach protocol to make this discoverable by Oskari publisher
Oskari.clazz.defineES('Oskari.publisher.ZoombarTool',
ZoombarTool,
{
protocol: ['Oskari.mapframework.publisher.Tool']
}
);

export { ZoombarTool };
3 changes: 2 additions & 1 deletion bundles/mapping/mapmodule/publisher/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ import { ScaleBarTool } from '../plugin/scalebar/publisher/ScalebarTool';
import { MyLocationTool } from '../plugin/mylocation/publisher/MyLocationTool';
import { PanButtonsTool } from '../plugin/panbuttons/publisher/PanButtonsTool';
import { IndexMapTool } from '../plugin/indexmap/publisher/IndexMapTool';
import { ZoombarTool } from '../plugin/zoombar/publisher/ZoombarTool';

export { LogoTool, ScaleBarTool, MyLocationTool, PanButtonsTool, IndexMapTool };
export { LogoTool, ScaleBarTool, MyLocationTool, PanButtonsTool, IndexMapTool, ZoombarTool };
5 changes: 4 additions & 1 deletion bundles/mapping/mapmodule/resources/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ Oskari.registerLocalization(
},
"IndexMapPlugin": {
"toolLabel": "Index map",
}
},
"Zoombar": {
"toolLabel": "Zoom bar"
},
}
}
});
3 changes: 3 additions & 0 deletions bundles/mapping/mapmodule/resources/locale/fi.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ Oskari.registerLocalization(
},
"IndexMapPlugin": {
"toolLabel": "Indeksikartta"
},
"Zoombar": {
"toolLabel": "Mittakaavasäädin"
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion bundles/mapping/mapmodule/resources/locale/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ Oskari.registerLocalization(
},
"IndexMapPlugin": {
"toolLabel": "Carte-index"
}
},
"Zoombar": {
"toolLabel": "Barre de zoom"
},
}
}
});
5 changes: 4 additions & 1 deletion bundles/mapping/mapmodule/resources/locale/is.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ Oskari.registerLocalization(
},
"IndexMapPlugin": {
"toolLabel": "Index kort"
}
},
"Zoombar": {
"toolLabel": "Þysjunarstika"
},
}
}
});
7 changes: 6 additions & 1 deletion bundles/mapping/mapmodule/resources/locale/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ Oskari.registerLocalization(
"PanButtons": {
"toolLabel": "Инструмент панорамирования"
},
"IndexMapPlugin": "Номенклатура карты",
"IndexMapPlugin": {
"toolLabel": "Номенклатура карты"
},
"Zoombar": {
"toolLabel": "Панель увеличения"
},
}
}
});
5 changes: 4 additions & 1 deletion bundles/mapping/mapmodule/resources/locale/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ Oskari.registerLocalization(
},
"IndexMapPlugin": {
"toolLabel": "Indexkarta"
}
},
"Zoombar": {
"toolLabel": "Skalans glidreglage"
},
}
}
});
4 changes: 0 additions & 4 deletions packages/framework/bundle/publisher2/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ Oskari.clazz.define("Oskari.mapframework.bundle.publisher2.PublisherBundle", fun
"type": "text/javascript",
"src": "../../../../bundles/framework/publisher2/tools/ToolbarTool.js"
},
{
"type": "text/javascript",
"src": "../../../../bundles/framework/publisher2/tools/ZoombarTool.js"
},
{
"type": "text/javascript",
"src": "../../../../bundles/framework/publisher2/tools/SearchTool.js"
Expand Down

0 comments on commit 6663029

Please sign in to comment.