mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 23:53:25 +00:00
grey out items being cut
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
import {
|
||||
copied,
|
||||
copySelection,
|
||||
cut,
|
||||
cutSelection,
|
||||
pasteSelection,
|
||||
selectAll,
|
||||
@@ -144,6 +145,8 @@
|
||||
{/if}
|
||||
<span
|
||||
class="w-full text-left truncate py-1 flex flex-row items-center {hidden
|
||||
? 'text-muted-foreground'
|
||||
: ''} {$cut && $copied?.some((i) => i.getFullId() === item.getFullId())
|
||||
? 'text-muted-foreground'
|
||||
: ''}"
|
||||
on:contextmenu={(e) => {
|
||||
|
@@ -230,7 +230,7 @@ export function applyToOrderedSelectedItemsFromFile(callback: (fileId: string, l
|
||||
}
|
||||
|
||||
export const copied = writable<ListItem[] | undefined>(undefined);
|
||||
const cut = writable(false);
|
||||
export const cut = writable(false);
|
||||
|
||||
export function copySelection(): boolean {
|
||||
let selected = get(selection).getSelected();
|
||||
|
Reference in New Issue
Block a user