Skip to content

Commit f227cfe

Browse files
jacmendtPouriaRezztomschulze
authored
Add vector support (#47)
* add badge for mosaic map * correct the language files * add mosaic as layer type in constants.js * Add geo json features (#380) * Rebase issue-294-geojson onto develop and rebuild js/css * Make time property look like other properties * Remove title for close button * Implement time filtering on map layers * Auto close filters with invalid timeRange * Move filter logic to GeoJsonLayer * Refactor useGeoJsonFeature, improve error handling * Reset filters when closing layer panel externally * Fix layer order not matching maplibre layer order after reload (#394) * Auto-login after successful registration (#393) * Auto-login after successful registration * fetch root site id dynamically * Refactor search extent calculation (#396) * Enable edit view * Install mapbox-draw * Refactor view state in GeoJsonLayerView * Make Save/Discard button more reusable * POC drawing * Refactor geojson map/application state handling * Add todos, set layer invisible when in drawing * Improve use geojsonfeature hook * Refactoring for drawing mode * Refactor exit transition (#399) * Refactor exit transition * Fix typo; Make all propTypes required --------- Co-authored-by: Tom Schulze <tom.schulze@pikobytes.de> * Fix propType error 'props must not be null' * fix unmount of exit transition * Adapt useGeoJsonFeatureDraw to mapbox draw api * Refactor MapboxDrawLoader to externalize handlers (#400) * Refactor MapboxDrawLoader to externalize handlers * Remove console.log; Remove file extension from import --------- Co-authored-by: Tom Schulze <tom.schulze@pikobytes.de> * Improve drawing - fix auto-deselect bug when drawing features - dont show edit panel when drawing a feature * Issue 329 add flow (#401) * Add ui elements * Finalize animation * fix bug in animation * Move geojson actions to its own component * Add comments * fix weird svg bug * Remove dropzone and mapWrapperWithGeojson * Add first step to new flow -> refactor dialog * Add functionality to 'upload' file * Make layer appear after click on hinzufügen * locale update * Improve dropzone usability * Add translations, improve user feedback * Cleanup * Reset build files * Adjust filter caret animation * fix animation for real * Refactor Dropzone --------- Co-authored-by: Nicolas Looschen <nicolas.looschen@pikobytes.de> * Fix reactivity issue in GeoJsonFeatureEditPanel - get rid of derived state updates with useEffect - do the same in GeoJsonFeaturePanel and EditNonStyleField * Remove attribution in GeoJsonFeaturePanel - was treated as a special attribute, however no styles/concept existed - is now treated as any other custom field * Minor improvements - add new export button - fix reset geojson feature externally - fix setting feature ids on GeoJsonLayer initialization * Add persistence switch to "add geojson form" (#403) * add persist switch to form * Cleanup dependencies * Fix layer management height * Handle layer mounting as well as temporary geojson state * Add funcitonality to create new vector map button * Rename function * Fix overflow in GeoJsonLayerView - see #404 * Set up atoms for draw state (#406) * Add atoms for draw states * Set up the state when entering draw mode * Revert build file changes * Add panel state for draw layout, add metadata panel draft * Fix title overflow in LayerManagementEntry * fix #407 * Fix uninitialized process variable error * Make DangerZone component reuseable * Style changes, translations * Refactor ImageFallback - refactor EditNonStyleField and GeoJsonFeaturePanel along with it * Add todo to GeoJsonControlBar * Refactor ImageWithFallback Add imageAsPreview prop (fixates image height), improves feature edit ux * Add loading state to ImageWithFallback * Add language keys, remove GeoJsonLayerEditPanel * Add save functionality (#408) * Add save functionality for local layer * Correctly set up state when creating new vector map * Add save functionality for new remote layers * #391 - filter for complete years * Add layer initialization after save * Add update functionality to save button * Add comment * Parse vector maps to geojson layers - unify preview feature handling * Make vector maps selectable * Adjust default display * add api functions to retrieve version/versions * Add comment to persistence writer * Fix bug in map result list search behavior * Adjust persistence for vector maps * Revert ExitTransition props - the component expects props to !== null to mount and === null to unmount - with an enter prop, managing the start of the transition, the interface seemed very unintuitive - instead, for now, just pass the props according to the enter/exit condition * Add metadata form POC * Remove unused drawState * Connect MetadataForm with save button * Add metadata form styling + translations * Add user roles + Basic history panel (#409) * Write user role and version to metadata * Fix unnecessary rerenders * Disable create / edit actions if user is not allowed to do them * Fix persistence of local geojson layers * Add auth handling for geojson control bar * Allow updating metadata on remote vector maps * Open metadata panel on new vector maps * Add basic history display * add comment * MetadataForm: add preview image, validate thumbUrl * Finalize MetadataPanel and other minor improvements - Add useDeleteGeojsonHook - Implement DeleteButton in MetadataPanel - Set default state for selectedGeoJsonFeatureIdentifier to 'null' instead of object - Bump maplibre-gl from 4.7.0 to 4.7.1 - Remove slight jumpy behavior in ImageWithFallback when toggling between image states * Display virtualized list (#410) * Add transitions for maplibre controls * Remove redundant css transition property * Add Fulltext search, refactor geojson layer view (#411) * Refactor Exit transition * Refactor state handling in GeojsonLayerView * Refacto filter handling * If the time extent filter equals the timeRange, do not set a filter * Adjust transitionited property of filter container * Make fulltext search work, port filter syntax * Finalize fulltext search * Revamp filter, fix readonly issue * Fix uninitialized ids on draw * Style mapbox-draw controls * Add Change tracking (#412) * Add basic change tracking * Finalize change tracking logic * Correctly handle deletion of changed feature, format output correctly * rollback changes to mapbox draw loader * Add style layers for drawing mode * Fix add geojson bug, add missing dependency * Adapt GeoJsonControlBar - Disable save button on empty layer title and not on view state NO_TITLE - Switch back to INITIAL_STATE if no changes are present instead of DEFAULT_STATE - Rename DEFAULT view state to SHOW_FEATURE_COUNT - Use word 'feature' consistently throughout UI text - Add no-features text to formattedFeatureCount (not used, but just to be consistent) - Fix PropType errors in GeoJsonControlBarContent * "Version doubting" - Send current version to the server (#413) * Fix bug when adding geojson to application * Send current version on update of vector map * Add basic error handling for version conflict * Remove unused import * Implement live preview in draw mode - Refactor useGeoJsonFeatureDrawHook * History Panel (#414) * Add history panel styling * Add handling to go back to current version * Fix change tracking when using a restored version * Update texts for history panel * Reset active version state when exiting draw mode * Remove fulltext-search-feature (#415) * Remove fulltext-search-feature * Fix height of filter panel * Fix persistence (#416) * Fix persistence for historic maps * Remove console statement * Set initial version on vector map create * Fix MetadataPanel not shown when creating new vector map * Fixes #419 * Improve drawing features - Open edit panel directly on create event - Fix start drawing is interrupted when feature is selected * Fix unregistering draw event handlers * Fix permission handling (#424) * Fix issues with authorization * Admin role takes precedence over editor role * Remove console statement * Fixes #417 * Add dependency array to useRecoilCallback * Fixes #425 * Fix url persistence (#427) * Refactor zoom to extent into hook, fixes #420 * Style modals (#428) * Integrate DialogRoles modal into GeoJsonControlBar * Make Modal reusable - center modal in Modal.scss, not in implementations - center modal taking navbar and footer into account - adapt all existing implementations (remove centering css) - remove css breaking bootstrap-modal animations (transform overwrites) * Fix typo in translation * Fix too large header height in modal - happens when fixed height is set in .modal-content * Refactor GeoJsonLayer - add static factory methods clarifying the intent to initialize from application or persistence state - make constructor private - fixes #429 * Remove todos * Implement GeoJsonRolesDialog POC - final styling and error handling missing * Add intro text that editing roles for new vector maps is not possible * Style roles form, adapt API endpoints * Add form validation, adapt data handling for api * Finalize GeoJson Roles form - Fix vector map roles api endpoint - Adapt roles authorizations for unsaved vector maps - Add basic error response handling to roles form - Add unsaved-map intro text to HistoryPanel * Fix long titles - Add mixin to _Helpers.scss - Fix MapSearchListElement thumbnail/metadata column proportions (use grid) - Fix GeoJsonControlBar - Add mixin to components where word break was already implemented * Fix attribution overlap w/ GeoJsonControlBar * Improve error handling - Wrap RolesDialog in ErrorBoundary in case GET request fails - Add basic error handling to create/update vector maps * Harmonize MapSearchResultList and LayerManagement * Add ErrorBoundary to GeoJsonHistoryPanel * add vector maps filter (#432) * Minor changes - Add focus styles for buttons - Hide ControlBar buttons if user is not allowed * Do not upload properties to mapView, correctly restore (#434) * Draft proposal for harmonizing layer types (#435) * Draft proposal for harmonizing layer types * Add backwards compatibility for restoring legacy 'geojson' map views * Don't store id for local layers in persistence object * fixes #431 * Display image if thumb_url is set for vector maps * Add proposal for displaying vector map layer description in Panel * Add quick fix filter for modal in vertical layout * Fix moveToTop button not working in vertical layout * Hide ShowGeoJsonLayer button in vertical layout * Add padding when zooming to extent, add fix for vertical layout * When updating a vector map, only send what's changed - add 422 error message on save * Make description in upload map form optional * Sort facet list alphabetically * Fix bug when creating a vector map from geojson file - feature properties were not converted to application state - time property was shown as invalid after saving * Build production files and package.json --------- Co-authored-by: Pouria Rezaei <129738734+PouriaRezz@users.noreply.github.com> Co-authored-by: Tom Schulze <40487303+tomschulze@users.noreply.github.com> Co-authored-by: Nicolas Looschen
1 parent a027d2d commit f227cfe

File tree

245 files changed

+16297
-6070
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+16297
-6070
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.env
2+
.env.*
13
.vscode
24
.idea
35
LOCAL.md

Build/esbuild.base.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,27 @@
66
*/
77
import esbuild from "esbuild";
88
import { sassPlugin } from "esbuild-sass-plugin";
9+
import { config } from "dotenv";
10+
11+
const getDefine = (env = "development") => {
12+
config({ path: `.env.${env}` });
13+
14+
const define = {};
15+
16+
for (const k in process.env) {
17+
define[`process.env.${k}`] = JSON.stringify(process.env[k]);
18+
}
19+
20+
return define;
21+
};
922

1023
// Define constants
1124
const isWatch = process.env.MODE === "watch";
1225
const isProduction = process.env.NODE_ENV === "production";
1326

1427
const baseOptions = {
1528
bundle: true,
16-
define: {
17-
"process.env.DEV_MODE_SECRET": JSON.stringify(""),
18-
"process.env.DEV_MODE_NAME": JSON.stringify(""),
19-
},
29+
define: getDefine(),
2030
loader: {
2131
".gif": "dataurl",
2232
".png": "dataurl",

Build/package-lock.json

Lines changed: 2942 additions & 2920 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Build/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@
2929
"watch": "npm-watch"
3030
},
3131
"type": "module",
32-
"author": "Alexander Bigga, Jacob Mendt <jacob.mendt@pikobytes.de>, Nicolas Looschen <nicolas.looschen@pikobytes.de>",
32+
"author": "Alexander Bigga, Jacob Mendt <jacob.mendt@pikobytes.de>, Nicolas Looschen <nicolas.looschen@pikobytes.de>, Tom Schulze <tom.schulze@pikobytes.de>, Pouria Rezaei <pouria.rezaei@pikobytes.de>",
3333
"devDependencies": {
3434
"@babel/core": "^7.15.5",
3535
"@babel/preset-env": "^7.16.8",
3636
"autoprefixer": "^10.4.0",
3737
"babel-cli": "^6.26.0",
38+
"dotenv": "^16.4.5",
3839
"esbuild": "^0.23.1",
3940
"esbuild-sass-plugin": "^3.3.1",
4041
"eslint": "^8.1.0",
@@ -51,21 +52,24 @@
5152
"terser": "^5.14.2"
5253
},
5354
"dependencies": {
55+
"@date-fns/utc": "^2.1.0",
56+
"@mapbox/mapbox-gl-draw": "^1.4.3",
5457
"@react-hook/resize-observer": "^1.2.5",
5558
"@react-hook/window-size": "^3.0.7",
5659
"@turf/bbox": "^7.1.0",
5760
"axios": "^0.24.0",
5861
"bootstrap": "^3.4.1",
5962
"clsx": "^1.1.1",
6063
"core-js": "^3.20.3",
64+
"date-fns": "^4.1.0",
6165
"debounce": "^1.2.1",
6266
"downshift": "^6.1.7",
6367
"fast-deep-equal": "^3.1.3",
6468
"feather-icons": "^4.29.0",
6569
"lint-staged": "^10.4.2",
6670
"lodash.debounce": "^4.0.8",
6771
"lodash.round": "^4.0.4",
68-
"maplibre-gl": "^4.7.0",
72+
"maplibre-gl": "^4.7.1",
6973
"node-sass": "^9.0.0",
7074
"ol": "^6.7.0",
7175
"proj4": "^2.7.5",
@@ -78,6 +82,7 @@
7882
"react-dnd-html5-backend": "^14.1.0",
7983
"react-dnd-multi-backend": "^7.0.0-alpha.4",
8084
"react-dom": "^17.0.1",
85+
"react-error-boundary": "^4.1.2",
8186
"react-feather": "^2.0.10",
8287
"react-hook-form": "^7.44.3",
8388
"react-icons": "^4.9.0",

Build/src/SettingsProvider.js

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@
88
import axios from "axios";
99
import { isDefined, isString } from "@util/util";
1010

11+
export const LANGUAGE_CODE = {
12+
EN: "en",
13+
DE: "de",
14+
};
15+
16+
const hasDebugCredentials =
17+
typeof process !== "undefined" &&
18+
isDefined(process.env.DEV_MODE_SECRET) &&
19+
process.env.DEV_MODE_SECRET !== "" &&
20+
isDefined(process.env.DEV_MODE_NAME) &&
21+
process.env.DEV_MODE_NAME !== "";
22+
23+
const debugCredentials = () => ({
24+
"Dev-Mode-Secret": process.env.DEV_MODE_SECRET,
25+
"Dev-Mode-Name": process.env.DEV_MODE_NAME,
26+
});
27+
1128
let settingsObject = {
1229
BASEMAPS: [
1330
{
@@ -29,10 +46,11 @@ let settingsObject = {
2946
},
3047
],
3148
ENABLE_TILE_PRELOADING: false,
32-
LANGUAGE_CODE: "en",
49+
LANGUAGE_CODE: LANGUAGE_CODE.EN,
3350
MARKER_IMAGE_ID: "marker",
3451
USERNAME: "anonymous",
3552
USER_ISAUTHENTICATED: false,
53+
USER_ROLE: null,
3654
};
3755

3856
export default {
@@ -170,22 +188,19 @@ export default {
170188

171189
// Debug credentials have the form of { "Dev-Mode-Secret": "some_secret", "Dev-Mode-Name": "some_name" }. They
172190
// can only be used if the server is started with the proper credentials.
173-
const debugCredentials = {
174-
"Dev-Mode-Secret": process.env.DEV_MODE_SECRET,
175-
"Dev-Mode-Name": process.env.DEV_MODE_NAME,
176-
};
191+
177192
const config = Object.assign(
178193
{
179194
baseURL,
180195
withCredentials: true,
181196
},
182-
debugCredentials
197+
hasDebugCredentials
183198
? {
184199
headers: {
185-
get: debugCredentials,
186-
post: debugCredentials,
187-
put: debugCredentials,
188-
delete: debugCredentials,
200+
get: debugCredentials(),
201+
post: debugCredentials(),
202+
put: debugCredentials(),
203+
delete: debugCredentials(),
189204
},
190205
}
191206
: {}
@@ -214,4 +229,8 @@ export default {
214229

215230
return { id, url };
216231
},
232+
233+
getUserRole() {
234+
return settingsObject["USER_ROLE"];
235+
},
217236
};

Build/src/_sass/overwrites-maplibre.scss

Lines changed: 108 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,13 @@
7575

7676
&.maplibregl-ctrl-group {
7777
background-color: rgba(255, 255, 255, 0.4);
78-
border-radius: 4px;
7978
box-shadow: none;
80-
padding: 3px;
79+
border-radius: unset;
80+
padding: 2px;
8181
}
8282

8383
button {
8484
background-color: $secondary-color;
85-
border-radius: 2px;
8685
background-repeat: no-repeat;
8786
background-position: center center;
8887
height: 22px;
@@ -92,7 +91,7 @@
9291
&:hover,
9392
&:focus {
9493
background-color: $secondary-color-dark;
95-
border-radius: 2px;
94+
border-radius: unset;
9695
}
9796

9897
&:disabled {
@@ -112,17 +111,13 @@
112111
}
113112

114113
&.maplibregl-ctrl-zoom-in {
115-
border-radius: 2px 2px 0 0;
116-
117114
.maplibregl-ctrl-icon {
118115
background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjIgMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTkuNTUyIDE5LjI1NHYtNi44NDhIMi43NTRWOS41NDNoNi43OThWMi43NDZoMi44OTZ2Ni43OTdoNi43OTh2Mi44NjNoLTYuNzk4djYuODQ4SDkuNTUyWiIgc3R5bGU9ImZpbGw6I2ZmZiIvPjwvc3ZnPg==");
119116
background-size: 18px auto;
120117
}
121118
}
122119

123120
&.maplibregl-ctrl-zoom-out {
124-
border-radius: 0 0 2px 2px;
125-
126121
.maplibregl-ctrl-icon {
127122
background-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjIgMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyIj48cGF0aCBkPSJNMTkuMjQ2IDEyLjQwNkgyLjc1NFY5LjU0M2gxNi40OTJ2Mi44NjNaIiBzdHlsZT0iZmlsbDojZmZmO2ZpbGwtcnVsZTpub256ZXJvIi8+PC9zdmc+");
128123
background-size: 18px auto;
@@ -194,10 +189,74 @@
194189
}
195190
}
196191

192+
.maplibregl-ctrl-top-right {
193+
// mapbox-draw expects a single ctrl when map.removeControl(draw) is called
194+
.mapboxgl-ctrl-group.mapboxgl-ctrl {
195+
display: flex;
196+
flex-direction: column;
197+
gap: 10px;
198+
199+
.maplibregl-ctrl {
200+
margin: 0;
201+
202+
&.maplibregl-ctrl-group {
203+
background-color: rgba(255, 255, 255, 0.4);
204+
box-shadow: none;
205+
border-radius: unset;
206+
padding: 2px;
207+
}
208+
209+
button {
210+
background-color: $secondary-color;
211+
background-repeat: no-repeat;
212+
background-position: center center;
213+
height: 22px;
214+
overflow: hidden;
215+
width: 22px;
216+
217+
&:hover,
218+
&:focus {
219+
background-color: $secondary-color-dark;
220+
border-radius: unset;
221+
}
222+
223+
&:disabled {
224+
background-color: $color-disabled;
225+
226+
.maplibregl-ctrl-icon {
227+
opacity: 0.8;
228+
}
229+
}
230+
231+
&.active {
232+
background-color: $primary-color;
233+
}
234+
235+
&.mapbox-gl-draw_point {
236+
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAyNiAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHJlY3QgeD0iMi42OTE0MSIgeT0iMiIgd2lkdGg9IjIyIiBoZWlnaHQ9IjIyIiAvPg0KICA8cmVjdCB4PSIxLjY5MTQxIiB5PSIxIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjQiIHN0cm9rZS13aWR0aD0iMiIvPg0KICA8cGF0aCBkPSJNMTMuNjkxNCA2QzEyLjM2NTggNi4wMDE1OCAxMS4wOTQ5IDYuNTQ0MjUgMTAuMTU3NiA3LjUwODk3QzkuMjIwMjEgOC40NzM2OSA4LjY5Mjk0IDkuNzgxNjkgOC42OTE0MSAxMS4xNDZDOC42OTE0MSAxNC42OTI0IDEyLjEzMjUgMTcuOTEwNiAxMy4xODY3IDE4LjgxMjVDMTMuMzI4NCAxOC45MzM3IDEzLjUwNjkgMTkgMTMuNjkxMSAxOUMxMy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SJzdmdfNiIvPg0KICA8cmVjdCB4PSI4LjQ0MTQxIiB5PSI3Ljc1IiB3aWR0aD0iMTAuNSIgaGVpZ2h0PSIxMC41IiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjEuNSIgaWQ9InN2Z183Ii8+DQogPC9nPg0KDQo8L3N2Zz4=");
241+
}
242+
243+
&.mapbox-gl-draw_line {
244+
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjciIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAyNyAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHJlY3QgeD0iMi42OTE0MSIgeT0iMiIgd2lkdGg9IjIyIiBoZWlnaHQ9IjIyIiAvPg0KICA8cmVjdCB4PSIxLjY5MTQxIiB5PSIxIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS1vcGFjaXR5PSIwLjQiIHN0cm9rZS13aWR0aD0iMiIvPg0KICA8cGF0aCBkPSJNMTcuNjkxNCA5TDkuNjkxNDEgMTciIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMS41Ii8+DQogIDxjaXJjbGUgY3g9IjkuNjkxNDEiIGN5PSIxNyIgcj0iMiIgZmlsbD0id2hpdGUiLz4NCiAgPGNpcmNsZSBjeD0iMTcuNjkxNCIgY3k9IjkiIHI9IjIiIGZpbGw9IndoaXRlIi8+DQo8L3N2Zz4=");
245+
}
246+
&.mapbox-gl-draw_trash {
247+
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjciIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAyNyAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHJlY3QgeD0iMi42OTE0MSIgeT0iMiIgd2lkdGg9IjIyIiBoZW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jIyOSA3LjYxNTE5IDE0LjU3OTMgNy42MjM0M0wxMC45Nzc1IDguMzEzNTNDMTAuOTU1OSA4LjMxNzY4IDEwLjkzMzcgOC4zMTc1MiAxMC45MTIyIDguMzEzMDVDMTAuODkwNiA4LjMwODU5IDEwLjg3MDIgOC4yOTk5MSAxMC44NTIxIDguMjg3NTFDMTAuODMzOSA4LjI3NTEyIDEwLjgxODQgOC4yNTkyNSAxMC44MDY0IDguMjQwODNDMTAuNzk0NCA4LjIyMjQxIDEwLjc4NjEgOC4yMDE4IDEwLjc4MjEgOC4xODAxOEwxMC42MjQxIDcuMzY2MDZaIiBmaWxsPSJ3aGl0ZSIvPg0KPC9zdmc+");
248+
}
249+
}
250+
}
251+
}
252+
}
253+
197254
.ol-map-large {
198255
.maplibregl-ctrl-top-left {
199-
top: 15px;
200-
left: 370px;
256+
top: 41px;
257+
left: 380px;
258+
259+
transition: 300ms ease-out transform;
201260

202261
.maplibregl-ctrl {
203262
box-sizing: border-box;
@@ -212,12 +271,14 @@
212271
}
213272

214273
.maplibregl-ctrl-bottom-right {
215-
bottom: 15px;
274+
bottom: 26px;
216275
display: flex;
217276
flex-direction: column-reverse;
218277
align-items: end;
219278
gap: 6px;
220-
right: 360px;
279+
right: 380px;
280+
281+
transition: 300ms ease-out transform;
221282

222283
.maplibregl-ctrl-attrib-button {
223284
display: none;
@@ -307,3 +368,38 @@
307368
}
308369
}
309370
}
371+
372+
// dynamic control positioning in draw mode
373+
.ol-map-large {
374+
.maplibregl-control-container.draw {
375+
// draw controls
376+
.maplibregl-ctrl-top-right {
377+
top: 41px;
378+
transform: translate(-20px, 0px);
379+
transition: 300ms ease-out transform;
380+
&.shifted {
381+
transform: translate(-380px, 0px);
382+
}
383+
}
384+
385+
// attribution container
386+
.maplibregl-ctrl-bottom-right {
387+
top: 41px;
388+
transform: translate(360px, 0px);
389+
390+
&.shifted {
391+
transform: translate(0px, 0px);
392+
}
393+
}
394+
395+
// map controls
396+
.maplibregl-ctrl-top-left {
397+
bottom: 26px;
398+
transform: translate(-360px, 0px);
399+
400+
&.shifted {
401+
transform: translate(0px, 0px);
402+
}
403+
}
404+
}
405+
}

Build/src/apps/georeferencer/views/MapTargetView/MapTargetView.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
}
3636

3737
&.ol-layerspy {
38-
top: 146px;
38+
top: 117px;
3939
}
4040

4141
&.ol-layerspy-radius-box {

0 commit comments

Comments
 (0)