after merge fix

This commit is contained in:
2026-06-16 20:14:45 +09:00
parent b518016a21
commit 8d36c3faca
6 changed files with 82 additions and 95 deletions

View File

@@ -5,26 +5,13 @@
import worldData from 'world-atlas/countries-50m.json';
import { get } from 'svelte/store';
import { journals } from '../stores/journalStore.js';
import airplaneImg from '../../assets/airplane.png';
import trainImg from '../../assets/train.png';
import busImg from '../../assets/bus.png';
import carImg from '../../assets/car.png';
import shipImg from '../../assets/ship.png';
import walkImg from '../../assets/walk.png';
import airplaneImg from '../../assets/animationPlane.png';
let { onclose, onprogress, mode = 'map', onmodechange } = $props();
const HOME_CODE = '203';
const TRANSPORT_IMG = {
flight: airplaneImg,
train: trainImg,
bus: busImg,
car: carImg,
ship: shipImg,
walk: walkImg,
};
const PLANE_SIZE = 28;
const PLANE_SIZE = 26;
const HOME_COLOR = '#8b5cf6';
const VISITED_COLOR = '#22c55e';
@@ -229,7 +216,7 @@
async function animateTrip(destCode, destFeature, transport = 'flight') {
if (!homeFeature || !destFeature) return;
const iconSrc = TRANSPORT_IMG[transport] ?? airplaneImg;
const iconSrc = airplaneImg;
const homeCentroid = d3.geoCentroid(homeFeature);
const destCentroid = d3.geoCentroid(destFeature);
if (mode === 'map') {
@@ -391,11 +378,15 @@
{#if isFinished}Journey complete!{:else if currentDateLabel}{currentDateLabel}{/if}
</div>
<div class="control-bar">
<button class="control-btn" onclick={replay}> Replay</button>
<button class="control-btn" onclick={() => switchMode(mode === 'map' ? 'globe' : 'map')}>
{mode === 'map' ? '🌍 Globe view' : '🗺 Map view'}
<button class="control-btn" onclick={replay}>
⟳ Replay
</button>
<button class="control-btn" onclick={() => switchMode(mode === 'map' ? 'globe' : 'map')}>
{mode === 'map' ? 'Globe animation' : 'Map animation'}
</button>
<button class="control-btn" onclick={close}>
✕ Back to Journaling
</button>
<button class="control-btn" onclick={close}> Close</button>
</div>
</div>