mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-24 03:40:07 +02:00
feat: tank tree svg first step
This commit is contained in:
1 parent
486538acc0
commit
91f3213122
5 files changed
+83
-3
No files matched your search
@@ -1,8 +1,11 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Pages
|
||||
{
|
||||
@@ -17,5 +20,29 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
|
||||
[Inject]
|
||||
public IMediator Mediator { get; set; }
|
||||
|
||||
[Inject]
|
||||
public IMediaQueriesService MediaQueriesService { get; set; }
|
||||
|
||||
public int FrameWidth { get; set; }
|
||||
public int FrameHeigth { get; set; }
|
||||
|
||||
public string FrameStyle
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"min-height: {FrameHeigth}px; overflow-y: auto; overflow-x: auto;";
|
||||
}
|
||||
}
|
||||
|
||||
protected async override Task OnInitializedAsync()
|
||||
{
|
||||
var screenWidth = await MediaQueriesService.WindowWidth();
|
||||
var screenHeight = await MediaQueriesService.WindowHeight();
|
||||
|
||||
FrameWidth = Convert.ToInt32(((decimal)screenWidth) * 0.94m);
|
||||
FrameHeigth = screenHeight - 390;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user