diff --git a/tools/mrt-map-builder/package.json b/tools/mrt-map-builder/package.json index 5a58977b5..539aa7afd 100644 --- a/tools/mrt-map-builder/package.json +++ b/tools/mrt-map-builder/package.json @@ -33,4 +33,4 @@ "globals": "^16.3.0", "vite": "^7.0.4" } -} \ No newline at end of file +} diff --git a/tools/mrt-map-builder/src/components/LineItem.tsx b/tools/mrt-map-builder/src/components/LineItem.tsx index f2f78acb2..77f6b06b7 100644 --- a/tools/mrt-map-builder/src/components/LineItem.tsx +++ b/tools/mrt-map-builder/src/components/LineItem.tsx @@ -125,8 +125,8 @@ function LineItem({ className="w-full" icon="tabler:square-letter-x" label="X Coordinate" - placeholder="X Coordinate" - setValue={value => { + value={point[0]} + onChange={value => { setMrtLines(prevLines => prevLines.map((l, i) => { if (i !== index) return l @@ -139,14 +139,13 @@ function LineItem({ }) ) }} - value={point[0]} /> { + value={point[1]} + onChange={value => { setMrtLines(prevLines => prevLines.map((l, i) => { if (i !== index) return l @@ -159,7 +158,6 @@ function LineItem({ }) ) }} - value={point[1]} /> )) diff --git a/tools/mrt-map-builder/src/components/StationItem.tsx b/tools/mrt-map-builder/src/components/StationItem.tsx index eac826b5f..265934a61 100644 --- a/tools/mrt-map-builder/src/components/StationItem.tsx +++ b/tools/mrt-map-builder/src/components/StationItem.tsx @@ -143,7 +143,7 @@ function StationItem({ /> )} - setValue={codes => { + onChange={codes => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -175,7 +175,7 @@ function StationItem({ className="w-full" icon="tabler:category" label="Station Type" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -235,7 +235,7 @@ function StationItem({ } icon="tabler:route" label="Lines" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -263,7 +263,7 @@ function StationItem({ icon="tabler:map-pin" label="Station Name" placeholder="Station Name" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -280,7 +280,7 @@ function StationItem({ className="flex-1" icon="tabler:square-letter-x" label="X Coordinate" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -297,7 +297,7 @@ function StationItem({ className="flex-1" icon="tabler:square-letter-y" label="Y Coordinate" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -316,7 +316,7 @@ function StationItem({ className="flex-1" icon="tabler:arrows-horizontal" label="Width" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -333,7 +333,7 @@ function StationItem({ className="flex-1" icon="tabler:arrows-vertical" label="Height" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -350,7 +350,7 @@ function StationItem({ className="flex-1" icon="tabler:rotate-2" label="Rotation" - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -371,7 +371,7 @@ function StationItem({ label="Text Offset X" max={100} min={-100} - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { @@ -390,7 +390,7 @@ function StationItem({ label="Text Offset Y" max={100} min={-100} - setValue={value => { + onChange={value => { setMrtStations(prevStations => prevStations.map(s => { if (s.id === station.id) { diff --git a/tools/mrt-map-builder/src/components/sidebar/LineSection.tsx b/tools/mrt-map-builder/src/components/sidebar/LineSection.tsx index 1369cd957..5a2a04fb7 100644 --- a/tools/mrt-map-builder/src/components/sidebar/LineSection.tsx +++ b/tools/mrt-map-builder/src/components/sidebar/LineSection.tsx @@ -59,10 +59,11 @@ function LineSection({ ) : ( )} diff --git a/tools/mrt-map-builder/src/components/sidebar/SettingsSection.tsx b/tools/mrt-map-builder/src/components/sidebar/SettingsSection.tsx index 6c1046dc0..ae8899b16 100644 --- a/tools/mrt-map-builder/src/components/sidebar/SettingsSection.tsx +++ b/tools/mrt-map-builder/src/components/sidebar/SettingsSection.tsx @@ -43,12 +43,12 @@ function SettingsSection({ { + value={settings.colorOfCurrentLine} + onChange={color => { setSettings({ colorOfCurrentLine: color }) }} - value={settings.colorOfCurrentLine} /> { + step={10} + value={settings.bgImageScale} + wrapperClassName="mb-8" + onChange={value => { setSettings({ bgImageScale: value }) }} - step={10} - value={settings.bgImageScale} - wrapperClassName="mb-8" />
@@ -86,7 +86,7 @@ function SettingsSection({ Show background image
{ setSettings({ showImage: !settings.showImage @@ -100,7 +100,7 @@ function SettingsSection({ Dark mode
{ setSettings({ darkMode: !settings.darkMode diff --git a/tools/mrt-map-builder/src/components/sidebar/StationSection.tsx b/tools/mrt-map-builder/src/components/sidebar/StationSection.tsx index c5192e4d9..ba61e6ee9 100644 --- a/tools/mrt-map-builder/src/components/sidebar/StationSection.tsx +++ b/tools/mrt-map-builder/src/components/sidebar/StationSection.tsx @@ -32,9 +32,9 @@ function StationSection({
{mrtStations.length > 0 ? ( filteredStations.length > 0 ? ( @@ -51,19 +51,21 @@ function StationSection({ ) : ( ) ) : ( )}
diff --git a/tools/mrt-map-builder/src/index.css b/tools/mrt-map-builder/src/index.css index e82ea4ae5..6749d9d92 100644 --- a/tools/mrt-map-builder/src/index.css +++ b/tools/mrt-map-builder/src/index.css @@ -6,7 +6,7 @@ layer(base); @plugin 'daisyui'; @import 'lifeforge-ui/dist/index.css'; -@source "../../../packages/lifeforge-ui/dist"; +@source '../../../packages/lifeforge-ui/dist'; @font-face { font-family: 'LTAIdentityMedium';