Updating TrksegViewer as well.
This commit is contained in:
parent
b30af4c3ac
commit
e73497265f
|
@ -1,4 +1,4 @@
|
|||
import { Component, createSignal, Show } from 'solid-js';
|
||||
import { Component, createSignal } from 'solid-js';
|
||||
import { peekCachedSignal } from '../../workers/cached-signals';
|
||||
import RteIcon from '../../icons/directions-svgrepo-com.svg?component-solid';
|
||||
import { useI18n } from '@solid-primitives/i18n';
|
||||
|
@ -7,9 +7,7 @@ import DeleteIcon from '@suid/icons-material/Delete';
|
|||
import QuestionMarkIcon from '@suid/icons-material/QuestionMark';
|
||||
import Tree from '../tree';
|
||||
import { LineString } from 'ol/geom';
|
||||
import DisplayOrGetAddress, {
|
||||
DisplayOrGetStartEndAddresses,
|
||||
} from '../display-or-get-address';
|
||||
import { DisplayOrGetStartEndAddresses } from '../display-or-get-address';
|
||||
import { getFormatedLength } from '../../lib/ol';
|
||||
import Alert from '../alert';
|
||||
import dispatch from '../../workers/dispatcher-main';
|
||||
|
|
|
@ -4,7 +4,7 @@ import Tree from '../tree';
|
|||
import TrkIcon from '../../icons/human-footprints-svgrepo-com.svg?component-solid';
|
||||
import { useI18n } from '@solid-primitives/i18n';
|
||||
import { getFormatedLength } from '../../lib/ol';
|
||||
import DisplayOrGetAddress from '../display-or-get-address';
|
||||
import { DisplayOrGetStartEndAddresses } from '../display-or-get-address';
|
||||
import { LineString } from 'ol/geom';
|
||||
|
||||
interface Props {
|
||||
|
@ -41,16 +41,10 @@ const TrksegViewer: Component<Props> = ({ trksegId }) => {
|
|||
<>
|
||||
<div>
|
||||
{getFormatedLength(lineString)} {t('from')}{' '}
|
||||
<DisplayOrGetAddress
|
||||
target={firstTrkpt}
|
||||
<DisplayOrGetStartEndAddresses
|
||||
id={trksegId}
|
||||
wpts={() => trkseg().trkpt}
|
||||
putAction='putTrkpt'
|
||||
putParamName='trkpt'
|
||||
/>{' '}
|
||||
{t('to')}{' '}
|
||||
<DisplayOrGetAddress
|
||||
target={lastTrkpt}
|
||||
putAction='putTrkpt'
|
||||
putParamName='trkpt'
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue