Compare commits

...

3 Commits

Author SHA1 Message Date
466b1d5383 Comment dev config for remote access
All checks were successful
CI / Lint (push) Successful in 20s
CI / Test (push) Successful in 34s
2026-03-11 18:26:45 +04:00
ea7cb2f895 1.13.3
Some checks failed
CI / Lint (push) Failing after 18s
CI / Test (push) Successful in 29s
2026-03-11 18:19:15 +04:00
7e94f335ac Prevent zooming when selecting saved places 2026-03-11 18:16:24 +04:00
9 changed files with 27 additions and 11 deletions

View File

@@ -441,6 +441,7 @@ export default class MapComponent extends Component {
// Track the selected place from the UI Service (Router -> Map) // Track the selected place from the UI Service (Router -> Map)
updateSelectedPin = modifier(() => { updateSelectedPin = modifier(() => {
const selected = this.mapUi.selectedPlace; const selected = this.mapUi.selectedPlace;
const options = this.mapUi.selectionOptions || {};
if (!this.selectedPinOverlay || !this.selectedPinElement) return; if (!this.selectedPinOverlay || !this.selectedPinElement) return;
@@ -471,7 +472,12 @@ export default class MapComponent extends Component {
} }
} }
if (selected.bbox) { if (options.preventZoom) {
// If we are preventing zoom (e.g. user clicked a bookmark), we still need to center
// but without changing the zoom level.
// We use animateToSmartCenter without a second argument (zoom=null).
this.animateToSmartCenter(coords);
} else if (selected.bbox) {
this.zoomToBbox(selected.bbox); this.zoomToBbox(selected.bbox);
} else { } else {
this.handlePinVisibility(coords); this.handlePinVisibility(coords);
@@ -870,6 +876,7 @@ export default class MapComponent extends Component {
'Clicked bookmark while sidebar open (switching):', 'Clicked bookmark while sidebar open (switching):',
clickedBookmark clickedBookmark
); );
this.mapUi.preventNextZoom = true;
this.router.transitionTo('place', clickedBookmark); this.router.transitionTo('place', clickedBookmark);
return; return;
} }
@@ -884,6 +891,7 @@ export default class MapComponent extends Component {
// Normal behavior (sidebar is closed) // Normal behavior (sidebar is closed)
if (clickedBookmark) { if (clickedBookmark) {
console.debug('Clicked bookmark:', clickedBookmark); console.debug('Clicked bookmark:', clickedBookmark);
this.mapUi.preventNextZoom = true;
this.router.transitionTo('place', clickedBookmark); this.router.transitionTo('place', clickedBookmark);
return; return;
} }

View File

@@ -72,7 +72,9 @@ export default class PlaceRoute extends Route {
// Notify the Map UI to show the pin // Notify the Map UI to show the pin
if (model) { if (model) {
this.mapUi.selectPlace(model); const options = { preventZoom: this.mapUi.preventNextZoom };
this.mapUi.selectPlace(model, options);
this.mapUi.preventNextZoom = false;
} }
// Stop the pulse animation if it was running (e.g. redirected from search) // Stop the pulse animation if it was running (e.g. redirected from search)
this.mapUi.stopSearch(); this.mapUi.stopSearch();

View File

@@ -9,18 +9,24 @@ export default class MapUiService extends Service {
@tracked returnToSearch = false; @tracked returnToSearch = false;
@tracked currentCenter = null; @tracked currentCenter = null;
@tracked searchBoxHasFocus = false; @tracked searchBoxHasFocus = false;
@tracked selectionOptions = {};
@tracked preventNextZoom = false;
selectPlace(place) { selectPlace(place, options = {}) {
this.selectedPlace = place; this.selectedPlace = place;
this.selectionOptions = options;
} }
clearSelection() { clearSelection() {
this.selectedPlace = null; this.selectedPlace = null;
this.selectionOptions = {};
this.preventNextZoom = false;
} }
startSearch() { startSearch() {
this.isSearching = true; this.isSearching = true;
this.isCreating = false; this.isCreating = false;
this.preventNextZoom = false;
} }
stopSearch() { stopSearch() {

View File

@@ -1,6 +1,6 @@
{ {
"name": "marco", "name": "marco",
"version": "1.13.2", "version": "1.13.3",
"private": true, "private": true,
"description": "Unhosted maps app", "description": "Unhosted maps app",
"repository": { "repository": {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -39,7 +39,7 @@
<meta name="msapplication-TileColor" content="#F6E9A6"> <meta name="msapplication-TileColor" content="#F6E9A6">
<meta name="msapplication-TileImage" content="/icons/icon-144.png"> <meta name="msapplication-TileImage" content="/icons/icon-144.png">
<script type="module" crossorigin src="/assets/main-CHoCxxBl.js"></script> <script type="module" crossorigin src="/assets/main-gjk9d6Ld.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-DAo4Q0R2.css"> <link rel="stylesheet" crossorigin href="/assets/main-DAo4Q0R2.css">
</head> </head>
<body> <body>

View File

@@ -3,9 +3,9 @@ import { extensions, ember } from '@embroider/vite';
import { babel } from '@rollup/plugin-babel'; import { babel } from '@rollup/plugin-babel';
export default defineConfig({ export default defineConfig({
server: { // server: {
host: '0.0.0.0' // host: '0.0.0.0',
}, // },
plugins: [ plugins: [
ember(), ember(),
// extra plugins here // extra plugins here