Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Arma3TacMapWebApp/Arma3TacMapWebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.7" />
<PackageReference Include="Pmad.Milsymbol.AspNetCore" Version="0.1.50" />
<PackageReference Include="Pmad.Milsymbol.Png" Version="0.1.50" />
<PackageReference Include="Pmad.Milsymbol.AspNetCore" Version="0.1.53" />
<PackageReference Include="Pmad.Milsymbol.Png" Version="0.1.53" />
<PackageReference Include="PuppeteerSharp" Version="20.0.5" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.6" />

Expand Down
9 changes: 9 additions & 0 deletions Arma3TacMapWebApp/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Arma3TacMapWebApp.Services.GameMapStorage.Json;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.Extensions.Logging;

namespace Arma3TacMapWebApp.Controllers
Expand Down Expand Up @@ -221,6 +222,14 @@ public async Task<IActionResult> GameCssContent(string gameName)
sb.AppendLine();
}
}
if ( game.Markers != null)
{
foreach (var marker in game.Markers)
{
sb.Append($".game-icon-{marker.Name!.ToLowerInvariant()} {{ background-image: url('{marker.ImagePng}'); }}");
sb.AppendLine();
}
}
return Content(sb.ToString(), "text/css");
}

Expand Down
3 changes: 2 additions & 1 deletion Arma3TacMapWebApp/Controllers/SymbolsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public async Task<IActionResult> Png(string sidc, [FromQuery] SymbolsViewModel?
Direction = ToDegrees(options?.Direction),
HigherFormation = options?.HigherFormation,
ReinforcedReduced = options?.ReinforcedReduced,
UniqueDesignation = options?.UniqueDesignation
UniqueDesignation = options?.UniqueDesignation,
OutlineWidth = 3
});
var stream = new MemoryStream();
symbol.SaveToPng(stream, 2);
Expand Down
187 changes: 58 additions & 129 deletions Arma3TacMapWebApp/Views/Home/EditMap.cshtml

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions Arma3TacMapWebApp/Views/Shared/_MapScripts.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
</script>
<script src="https://cdn.jsdelivr.net/npm/@@microsoft/[email protected]/dist/browser/signalr.min.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/milsymbol.min.js">
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/milstd.min.js">
</script>
<pmad-script-milsymbol />
@if (Model.init == "initLiveMap")
{
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap-select.min.js">
</script>
<pmad-script-choices />
}
<script src="@Model.endpoint/js/mapUtils.js">
</script>
Expand All @@ -23,8 +19,6 @@
<script src="//mrdoob.github.io/stats.js/build/stats.min.js" onload="var stats = new Stats(); document.body.appendChild(stats.dom); requestAnimationFrame(function loop() { stats.update(); requestAnimationFrame(loop) });">
</script>
}
<script src="/js/milstdExtra.js" asp-append-version="true">
</script>
<script src="/js/milMissions.js" asp-append-version="true">
</script>
<script src="/js/arma3TacMap.js" asp-append-version="true">
Expand Down
76 changes: 72 additions & 4 deletions Arma3TacMapWebApp/wwwroot/css/arma3TacMap.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@
/*text-shadow: 1px 1px 2px white;*/
}

.btn-outline-secondary {
.map .btn-outline-secondary {
background-color: rgba(255, 255, 255, 0.5);
text-shadow: 0px 0px 4px #fff;
}
.btn-outline-secondary:hover {
.map .btn-outline-secondary:hover {
text-shadow: none;
}
.btn-outline-primary {
.map .btn-outline-primary {
background-color: rgba(255, 255, 255, 0.5);
}

Expand Down Expand Up @@ -165,4 +165,72 @@
font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;
font-size: 12px;
line-height: 1.5;
}
}

/** Color dropdown */

.choices__list--dropdown.choices-dropdown-grid {
width: 300px !important;
}

.choices-dropdown-grid div.choices__list {
display: flex;
flex-wrap: wrap;
flex-direction: column;
width: 300px;
}

.choices-dropdown-grid div.choices__list div.choices__item {
width: 100px;
text-align: center;
border: 7px solid transparent;
padding: 3px;
}
.choices-dropdown-grid div.choices__list div.choices__item.is-highlighted {
border: 7px solid #f2f2f2;
padding: 3px;
}

div.choices__item.item-color {
padding: 2px 4px;
margin: -2px -4px;
border-radius: 3px;
box-sizing: content-box;
text-align: center;
}

/** Map overlay color selector (for line tool) */

main .map div.choices__item.item-color {
color: transparent !important;
width: 22px;
height: 30px;
margin: -5px -8px -5px -8px;
box-sizing: border-box;
}

main .map .choices[data-type*="select-one"]::after {
right: 4px;
}

main .map .choices .choices__inner {
background-color: rgba(255, 255, 255, 0.5);
border: 1px #6c757d solid;
border-radius: 4px;
}

/** Basic marker dropdown */
.choices__item.game-icon {
background-size: 20px 20px;
background-repeat: no-repeat;
background-position: 0px;
padding-left: 30px;
}
.choices__list--dropdown .choices__item.game-icon {
padding-left: 40px !important;
background-position: 10px;
}

div.modal div.pmad-symbol-selector div.preview-box {
min-height: 110px;
}
29 changes: 29 additions & 0 deletions Arma3TacMapWebApp/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,32 @@ input:checked + label.orbat-radio {
.list-group-item.active .btn {
border-color: white;
}

/* Slight changes to ChoicesJS to be boostrap lookalike */
main .choices .choices__inner {
background-color: #fff;
border: 1px solid #ced4da;
transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

main .choices.is-focused .choices__inner {
border-color: #80bdff;
box-shadow: 0 0 0 .2rem rgba(0,123,255,.25);
border-radius: 2.5px;
}

main .choices.is-focused {
overflow: unset;
}

main .choices .choices__list--dropdown {
border-radius: 2.5px;
border: 1px solid #ced4da;
box-shadow: 0 0 .1rem .1rem rgba(0,0,0,.1);
}

/* Allow choices height to match standard form field (not suitable for symbol selector choices due to icon) */
.modal-body .choices[data-type*="select-one"] .choices__inner.same-height-as-bs {
min-height: 24.4px;
padding: 3.3px 12px;
}
Loading
Loading