From 0e43e947ca8be0e529f2505a66143cb8b1fcbb8e Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Wed, 12 Jul 2023 00:18:56 +0200 Subject: Changes --- MatrixRoomUtils.Web/Shared/ModalWindow.razor | 93 ++++++---------------------- 1 file changed, 18 insertions(+), 75 deletions(-) (limited to 'MatrixRoomUtils.Web/Shared/ModalWindow.razor') diff --git a/MatrixRoomUtils.Web/Shared/ModalWindow.razor b/MatrixRoomUtils.Web/Shared/ModalWindow.razor index 75c2933..216f1f3 100644 --- a/MatrixRoomUtils.Web/Shared/ModalWindow.razor +++ b/MatrixRoomUtils.Web/Shared/ModalWindow.razor @@ -1,95 +1,37 @@
@Title - -
-
- @ChildContent + +
+
+ @ChildContent +
- - @code { - + [Parameter] public RenderFragment? ChildContent { get; set; } - + [Parameter] public string Title { get; set; } = "Untitled window"; - + [Parameter] public double X { get; set; } = 60; - + [Parameter] public double Y { get; set; } = 60; - + [Parameter] public Action OnCloseClicked { get; set; } - + + [Parameter] + public bool Collapsed { get; set; } = false; private double _x = 60; private double _y = 60; - + protected override void OnInitialized() { _x = X; _y = Y; @@ -97,16 +39,17 @@ private void WindowDrag(DragEventArgs obj) { Console.WriteLine("Drag: " + obj.ToJson()); - + _x += obj.MovementX; _y += obj.MovementY; - + StateHasChanged(); } private bool isDragging = false; private double dragX = 0; private double dragY = 0; + private void MouseDown(MouseEventArgs obj) { isDragging = true; dragX = obj.ClientX; @@ -127,4 +70,4 @@ } } -} \ No newline at end of file +} -- cgit 1.5.1