update
This commit is contained in:
parent
c5686e4ecf
commit
511614df72
|
|
@ -1,40 +0,0 @@
|
||||||
@inject HttpClient Http
|
|
||||||
|
|
||||||
<div class="d-flex flex-column h-100 w-100">
|
|
||||||
<span Class="title">@MapName</span>
|
|
||||||
<div class="d-flex flex-grow-1 w-100 flex-column">
|
|
||||||
<div class="map-item">
|
|
||||||
<img src="@imageSrc" alt="map image" onerror="this.onerror=null; this.src='/images/Image-not-found.png';" />
|
|
||||||
</div>
|
|
||||||
<MudButton StartIcon="@Icons.Material.Filled.FileDownload" Class="m-2" Size="Size.Small" Variant="Variant.Filled" Color="Color.Primary" Disabled="Disable">
|
|
||||||
DOWNLOAD
|
|
||||||
</MudButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@code {
|
|
||||||
private bool Disable = true;
|
|
||||||
private string imageSrc = "/images/Image-not-found.png";
|
|
||||||
private string MapName = "Map preview";
|
|
||||||
private Guid MapId = Guid.Empty;
|
|
||||||
|
|
||||||
|
|
||||||
public void SetMapPreview(MapDto? map)
|
|
||||||
{
|
|
||||||
if (map is null)
|
|
||||||
{
|
|
||||||
Disable = true;
|
|
||||||
MapName = "Map preview";
|
|
||||||
imageSrc = "/images/Image-not-found.png";
|
|
||||||
MapId = Guid.Empty;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
imageSrc = $"api/Images/map/{map.Id}?t={DateTime.Now}";
|
|
||||||
MapName = map.Name;
|
|
||||||
MapId = map.Id;
|
|
||||||
Disable = false;
|
|
||||||
}
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
.map-item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
height: fit-content;
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-item img {
|
|
||||||
justify-content: center;
|
|
||||||
width: 95%;
|
|
||||||
height: 400px;
|
|
||||||
object-fit: contain;
|
|
||||||
border-radius: 10px;
|
|
||||||
image-rendering: pixelated;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
display: flex;
|
|
||||||
height: 77px;
|
|
||||||
width: 100%;
|
|
||||||
justify-content: center;
|
|
||||||
align-content: center;
|
|
||||||
/*border-bottom: 0.5px solid gray;*/
|
|
||||||
font-size: 30px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding-bottom: .5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-update-item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
height: fit-content;
|
|
||||||
}
|
|
||||||
|
|
||||||
.map-update-item img {
|
|
||||||
width: 100%;
|
|
||||||
height: 400px;
|
|
||||||
object-fit: contain;
|
|
||||||
border-radius: 10px;
|
|
||||||
image-rendering: pixelated;
|
|
||||||
}
|
|
||||||
|
|
@ -60,14 +60,11 @@
|
||||||
private List<MapDto> Maps = [];
|
private List<MapDto> Maps = [];
|
||||||
private List<MapDto> MapsShow = [];
|
private List<MapDto> MapsShow = [];
|
||||||
|
|
||||||
private int selectedRowNumber = -1;
|
|
||||||
private MapDto MapSelected = new();
|
private MapDto MapSelected = new();
|
||||||
|
|
||||||
private MudTable<MapDto>? Table;
|
private MudTable<MapDto>? Table;
|
||||||
private ElementReference ViewContainerRef;
|
private ElementReference ViewContainerRef;
|
||||||
private ElementReference ToolbarRef;
|
|
||||||
|
|
||||||
private MapPreview? MapPreviewRef;
|
|
||||||
private double TableHeight = 105;
|
private double TableHeight = 105;
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
|
|
|
||||||
|
|
@ -268,17 +268,20 @@
|
||||||
|
|
||||||
private async Task HandleTouchMove(TouchEventArgs e)
|
private async Task HandleTouchMove(TouchEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Touches.Length == 1)
|
if (IsTouching)
|
||||||
{
|
{
|
||||||
await HandleSingleTouchMove(e.Touches[0]);
|
if (e.Touches.Length == 1)
|
||||||
}
|
{
|
||||||
else if (e.Touches.Length == 2)
|
await HandleSingleTouchMove(e.Touches[0]);
|
||||||
{
|
}
|
||||||
await HandlePinchZoom(e.Touches[0], e.Touches[1]);
|
else if (e.Touches.Length == 2)
|
||||||
}
|
{
|
||||||
|
await HandlePinchZoom(e.Touches[0], e.Touches[1]);
|
||||||
|
}
|
||||||
|
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
await DrawCanvas();
|
await DrawCanvas();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleTouchStart(TouchEventArgs e)
|
private void HandleTouchStart(TouchEventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<div class="view">
|
<div class="view">
|
||||||
|
<h4>Infomations</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,5 @@
|
||||||
border-radius: var(--mud-default-borderradius);
|
border-radius: var(--mud-default-borderradius);
|
||||||
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
|
||||||
box-shadow: var(--mud-elevation-10);
|
box-shadow: var(--mud-elevation-10);
|
||||||
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user