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 {
|
import {
|
||||||
copied,
|
copied,
|
||||||
copySelection,
|
copySelection,
|
||||||
|
cut,
|
||||||
cutSelection,
|
cutSelection,
|
||||||
pasteSelection,
|
pasteSelection,
|
||||||
selectAll,
|
selectAll,
|
||||||
@@ -144,6 +145,8 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<span
|
<span
|
||||||
class="w-full text-left truncate py-1 flex flex-row items-center {hidden
|
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'
|
? 'text-muted-foreground'
|
||||||
: ''}"
|
: ''}"
|
||||||
on:contextmenu={(e) => {
|
on:contextmenu={(e) => {
|
||||||
|
@@ -230,7 +230,7 @@ export function applyToOrderedSelectedItemsFromFile(callback: (fileId: string, l
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const copied = writable<ListItem[] | undefined>(undefined);
|
export const copied = writable<ListItem[] | undefined>(undefined);
|
||||||
const cut = writable(false);
|
export const cut = writable(false);
|
||||||
|
|
||||||
export function copySelection(): boolean {
|
export function copySelection(): boolean {
|
||||||
let selected = get(selection).getSelected();
|
let selected = get(selection).getSelected();
|
||||||
|
Reference in New Issue
Block a user