-
Notifications
You must be signed in to change notification settings - Fork 20
/
DragInitializer.razor
34 lines (29 loc) · 1.05 KB
/
DragInitializer.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@inherits Fluxor.Blazor.Web.Components.FluxorComponent
<div class="luth_drag-initializer"
style="@StyleCss"
@onmousemove="DispatchSetDragStateActionOnMouseMove"
@onmouseup="DispatchSetDragStateActionOnMouseUp">
@{
var dragState = DragStateWrap.Value;
var draggableViewModel = dragState.Drag;
}
@if (draggableViewModel is not null)
{
var dropzoneViewModelList = draggableViewModel.DropzoneList;
if (draggableViewModel.DragComponentType is not null)
{
<div style="draggableViewModel.ElementDimensions.StyleString">
<DynamicComponent Type="draggableViewModel.DragComponentType"
Parameters="draggableViewModel.DragComponentParameterMap" />
</div>
}
foreach (var dropzone in dropzoneViewModelList)
{
<div style="z-index: @dropzone.MeasuredHtmlElementDimensions.ZIndex; @dropzone.ElementDimensions.StyleString"
class="luth_dropzone @GetIsActiveCssClass(dropzone) @dropzone.CssClass"
@onmouseover="() => _onMouseOverDropzone = dropzone"
@onmouseover:stopPropagation="true">
</div>
}
}
</div>