You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
944 B
50 lines
944 B
using Blazorise;
|
|
using Microsoft.AspNetCore.Components;
|
|
using ProjetBlazor.Modeles;
|
|
|
|
namespace ProjetBlazor.Components
|
|
{
|
|
public partial class MusiqueComponent
|
|
{
|
|
[Parameter]
|
|
public Musique musique { get; set; }
|
|
|
|
[Parameter]
|
|
public bool NoDrop { get; set; }
|
|
|
|
[CascadingParameter]
|
|
public DragAndDrop Parent { get; set; }
|
|
|
|
internal void OnDragEnter()
|
|
{
|
|
if (NoDrop)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
internal void OnDragLeave()
|
|
{
|
|
if (NoDrop)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
|
|
internal void OnDrop()
|
|
{
|
|
if (NoDrop)
|
|
{
|
|
return;
|
|
}
|
|
|
|
this.musique = Parent.CurrentDragMusique;
|
|
}
|
|
|
|
private void OnDragStart()
|
|
{
|
|
Parent.CurrentDragMusique = this.musique;
|
|
}
|
|
}
|
|
}
|