Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: display distinct map pin and circle markers for anchored and no…
…n-anchored devices respectively.
  • Loading branch information
DTTerastar committed Dec 16, 2025
commit 73ae1c232412924c8a0f62fcde9bf443636932e6
27 changes: 6 additions & 21 deletions src/ui/src/lib/DeviceMarker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,12 @@

{#if visible && d.confidence > 1 && d.location}
<g in:fade={{ duration: 1000 }} out:fade={{ duration: 1000 }}>
<circle
role="none"
cx={$xScale($x)}
cy={$yScale($y)}
fill={$c}
stroke={d.id == hovered ? 'black' : 'white'}
stroke-width={$s}
r={$r}
onmouseover={() => {
hover(d);
}}
onfocus={() => {
select(d);
}}
onmouseout={() => {
hover(null);
}}
onblur={() => {
unselect();
}}
/>
{#if d.isAnchored ?? false}
<path role="none" d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z" transform="translate({$xScale($x) - 12}, {$yScale($y) - 24})" fill={$c} stroke={d.id == hovered ? 'black' : 'white'} stroke-width={$s} onmouseover={() => hover(d)} onfocus={() => select(d)} onmouseout={() => hover(null)} onblur={() => unselect()} />
<circle cx={$xScale($x)} cy={$yScale($y) - 15} r={3} fill="white" pointer-events="none" />
{:else}
<circle role="none" cx={$xScale($x)} cy={$yScale($y)} fill={$c} stroke={d.id == hovered ? 'black' : 'white'} stroke-width={$s} r={$r} onmouseover={() => hover(d)} onfocus={() => select(d)} onmouseout={() => hover(null)} onblur={() => unselect()} />
{/if}
<text x={$xScale($x) + 7} y={$yScale($y) + 3} fill="white" font-size="10px">{d.name ?? d.id}</text>
</g>
{/if}
Loading