Skip to content

Commit

Permalink
Remove drag/drop
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander van Delft committed Dec 16, 2024
1 parent 5724f4a commit 80befdd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
7 changes: 1 addition & 6 deletions COMET.Web.Common/Components/CardView/CardView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@
<ItemContent>
<div class="col" style="padding-left:0px;margin-left:0px;height:(@this.ItemSize)px;min-width:(@this.MinWidth)px;">
<div class="card @(this.GetSelectedClass(@context))"
@onclick="@(() => this.selectItem(@context))"
draggable="false"
dropzone="move"
ondragover="event.preventDefault();"
@ondragstart="@(() => this.OnDragNode(@context))"
@ondrop="@(() => this.OnDropNode(@context))">
@onclick="@(() => this.selectItem(@context))">
<div class="card-body" style="overflow-y:hidden;overflow-x:hidden">
<CascadingValue Name="CardView" Value = "this">
<CascadingValue Name="SearchTerm" Value="this.searchTerm">
Expand Down
24 changes: 0 additions & 24 deletions COMET.Web.Common/Components/CardView/CardView.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ public partial class CardView<T> : DisposableComponent
/// </summary>
private T selected;

/// <summary>
/// Gets the dragged node used in drag and drop interactions
/// </summary>
private T draggedNode { get; set; }

/// <summary>
/// Gets or sets the term where to search/filter items on
/// </summary>
Expand Down Expand Up @@ -136,25 +131,6 @@ private void selectItem(T item)
this.selected = item;
}

/// <summary>
/// Method invoked when a node is dragged
/// </summary>
/// <param name="node">The dragged node</param>
private void OnDragNode(T node)
{
this.draggedNode = node;
}

/// <summary>
/// Method invoked when a node is dropped
/// </summary>
/// <param name="targetNode">The target node where the <see cref="draggedNode"/> has been dropped</param>
/// <returns>A <see cref="Task"/></returns>
private async Task OnDropNode(T targetNode)
{
//not implemented yet
}

/// <summary>
/// Filters the list of items to show in the UI based on the <see cref="searchTerm"/>
/// </summary>
Expand Down

0 comments on commit 80befdd

Please sign in to comment.