Skip to content

Commit

Permalink
#22 add icons for NRU and ADS (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz authored Jul 15, 2021
1 parent ad1a14e commit f419c92
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
Binary file added assets/img/ADS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions js/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ const appConfig = {
appEpics: {}
};



/**
* Define a custom list of plugins with:
*
Expand Down
2 changes: 1 addition & 1 deletion js/extension/epics/urbanisme.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const setUpPluginEpic = (action$, store) =>
// adds projections from localConfig.json
// The extension do not see the state proj4 of MapStore (can not reproject in custom CRS as mapstore does)
// so they have to be registered again in the extension.
const { projectionDefs = [] } = localConfigSelector(store.getState());
const { projectionDefs = [] } = localConfigSelector(store.getState()) ?? {};
projectionDefs.forEach((proj) => {
proj4.defs(proj.code, proj.def);
});
Expand Down
10 changes: 8 additions & 2 deletions js/extension/plugins/urbanisme/UrbanismeToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/
import React, { useEffect } from "react";
import ADSIcon from '../../../../assets/img/ADS.png';

import Toolbar from "@mapstore/components/misc/toolbar/Toolbar";
import Message from "@mapstore/components/I18N/Message";
Expand Down Expand Up @@ -66,14 +67,19 @@ const UrbanismeToolbar = ({
}}
buttons={[
{
glyph: "info-sign",
glyph: 'sheet',
tooltip: <Message msgId={'urbanisme.nru.tooltip'}/>,
bsStyle: activeTool === NRU ? "success" : "primary",
active: activeTool === NRU,
onClick: () => onToggleTool(NRU)
},
{
glyph: "info-sign",
text: <img src={ADSIcon} style={{
width: 40,
position: "relative",
left: -
3
}}/>,
tooltip: <Message msgId={'urbanisme.ads.tooltip'}/>,
bsStyle: activeTool === ADS ? "success" : "primary",
active: activeTool === ADS,
Expand Down
2 changes: 1 addition & 1 deletion js/extension/utils/UrbanismeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
import { includes, isEmpty } from "lodash";
import { isEmpty } from "lodash";
import { saveAs } from "file-saver";
import { get as getProjection } from 'ol/proj';

Expand Down

0 comments on commit f419c92

Please sign in to comment.