mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-01 08:12:32 +00:00
use same data for desc and cmt field of waypoints
This commit is contained in:
@@ -36,7 +36,7 @@
|
|||||||
{#if $currentPopupWaypoint[0].desc}
|
{#if $currentPopupWaypoint[0].desc}
|
||||||
<span>{$currentPopupWaypoint[0].desc}</span>
|
<span>{$currentPopupWaypoint[0].desc}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $currentPopupWaypoint[0].cmt}
|
{#if $currentPopupWaypoint[0].cmt && $currentPopupWaypoint[0].cmt !== $currentPopupWaypoint[0].desc}
|
||||||
<span>{$currentPopupWaypoint[0].cmt}</span>
|
<span>{$currentPopupWaypoint[0].cmt}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{#if $currentTool === Tool.WAYPOINT}
|
{#if $currentTool === Tool.WAYPOINT}
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
let name: string;
|
let name: string;
|
||||||
let description: string;
|
let description: string;
|
||||||
let comment: string;
|
|
||||||
let longitude: number;
|
let longitude: number;
|
||||||
let latitude: number;
|
let latitude: number;
|
||||||
|
|
||||||
@@ -55,7 +54,12 @@
|
|||||||
$selectedWaypoint[0] = fileStore.file.wpt[$selectedWaypoint[0]._data.index];
|
$selectedWaypoint[0] = fileStore.file.wpt[$selectedWaypoint[0]._data.index];
|
||||||
name = $selectedWaypoint[0].name ?? '';
|
name = $selectedWaypoint[0].name ?? '';
|
||||||
description = $selectedWaypoint[0].desc ?? '';
|
description = $selectedWaypoint[0].desc ?? '';
|
||||||
comment = $selectedWaypoint[0].cmt ?? '';
|
if (
|
||||||
|
$selectedWaypoint[0].cmt !== undefined &&
|
||||||
|
$selectedWaypoint[0].cmt !== $selectedWaypoint[0].desc
|
||||||
|
) {
|
||||||
|
description += '\n\n' + $selectedWaypoint[0].cmt;
|
||||||
|
}
|
||||||
longitude = $selectedWaypoint[0].getLongitude();
|
longitude = $selectedWaypoint[0].getLongitude();
|
||||||
latitude = $selectedWaypoint[0].getLatitude();
|
latitude = $selectedWaypoint[0].getLatitude();
|
||||||
} else {
|
} else {
|
||||||
@@ -70,7 +74,6 @@
|
|||||||
function resetWaypointData() {
|
function resetWaypointData() {
|
||||||
name = '';
|
name = '';
|
||||||
description = '';
|
description = '';
|
||||||
comment = '';
|
|
||||||
longitude = 0;
|
longitude = 0;
|
||||||
latitude = 0;
|
latitude = 0;
|
||||||
}
|
}
|
||||||
@@ -104,7 +107,7 @@
|
|||||||
let waypoint = $selectedWaypoint[0].clone();
|
let waypoint = $selectedWaypoint[0].clone();
|
||||||
waypoint.name = name;
|
waypoint.name = name;
|
||||||
waypoint.desc = description;
|
waypoint.desc = description;
|
||||||
waypoint.cmt = comment;
|
waypoint.cmt = description;
|
||||||
waypoint.setCoordinates({
|
waypoint.setCoordinates({
|
||||||
lat: latitude,
|
lat: latitude,
|
||||||
lon: longitude
|
lon: longitude
|
||||||
@@ -123,7 +126,7 @@
|
|||||||
let waypoint = new Waypoint({
|
let waypoint = new Waypoint({
|
||||||
name,
|
name,
|
||||||
desc: description,
|
desc: description,
|
||||||
cmt: comment,
|
cmt: description,
|
||||||
attributes: {
|
attributes: {
|
||||||
lat: latitude,
|
lat: latitude,
|
||||||
lon: longitude
|
lon: longitude
|
||||||
@@ -169,8 +172,6 @@
|
|||||||
<Input bind:value={name} id="name" class="font-semibold h-8" />
|
<Input bind:value={name} id="name" class="font-semibold h-8" />
|
||||||
<Label for="description">{$_('toolbar.waypoint.description')}</Label>
|
<Label for="description">{$_('toolbar.waypoint.description')}</Label>
|
||||||
<Textarea bind:value={description} id="description" />
|
<Textarea bind:value={description} id="description" />
|
||||||
<Label for="comment">{$_('toolbar.waypoint.comment')}</Label>
|
|
||||||
<Textarea bind:value={comment} id="comment" />
|
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<div>
|
<div>
|
||||||
<Label for="latitude">{$_('toolbar.waypoint.latitude')}</Label>
|
<Label for="latitude">{$_('toolbar.waypoint.latitude')}</Label>
|
||||||
|
@@ -151,7 +151,6 @@
|
|||||||
"tooltip": "Create and edit points of interest",
|
"tooltip": "Create and edit points of interest",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"description": "Description",
|
"description": "Description",
|
||||||
"comment": "Comment",
|
|
||||||
"longitude": "Longitude",
|
"longitude": "Longitude",
|
||||||
"latitude": "Latitude",
|
"latitude": "Latitude",
|
||||||
"create": "Create point of interest",
|
"create": "Create point of interest",
|
||||||
|
Reference in New Issue
Block a user