Tweak spritesheet page

This commit is contained in:
dingo
2025-12-29 20:25:49 -05:00
parent 6e928bc26a
commit c35a9b5034
@@ -216,7 +216,7 @@
} }
<!-- Frame Reference --> <!-- Frame Reference -->
<div class="mt-4 p-4 bg-gray-900 rounded-lg"> @* <div class="mt-4 p-4 bg-gray-900 rounded-lg">
<p class="text-sm text-gray-400 mb-2">Frame Reference (frames are numbered 0 to @(Model.Sheet.TotalFrames - 1), left-to-right, top-to-bottom)</p> <p class="text-sm text-gray-400 mb-2">Frame Reference (frames are numbered 0 to @(Model.Sheet.TotalFrames - 1), left-to-right, top-to-bottom)</p>
<div class="grid gap-1" style="grid-template-columns: repeat(@Model.Sheet.Columns, minmax(0, 1fr)); max-width: fit-content;"> <div class="grid gap-1" style="grid-template-columns: repeat(@Model.Sheet.Columns, minmax(0, 1fr)); max-width: fit-content;">
@for (int i = 0; i < Model.Sheet.TotalFrames; i++) @for (int i = 0; i < Model.Sheet.TotalFrames; i++)
@@ -224,7 +224,7 @@
<div class="w-8 h-8 bg-gray-700 rounded text-xs flex items-center justify-center text-gray-300">@i</div> <div class="w-8 h-8 bg-gray-700 rounded text-xs flex items-center justify-center text-gray-300">@i</div>
} }
</div> </div>
</div> </div> *@
</div> </div>
</div> </div>
@@ -345,8 +345,8 @@
} }
}); });
</script> </script>
<script> <script>
(() => { (() => {
const img = document.getElementById('sheetImg'); const img = document.getElementById('sheetImg');
const canvas = document.getElementById('sheetCanvas'); const canvas = document.getElementById('sheetCanvas');
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');
@@ -513,7 +513,7 @@
img.addEventListener('load', draw); img.addEventListener('load', draw);
if (img.complete) draw(); if (img.complete) draw();
hookRedraw(); hookRedraw();
})(); })();
</script> </script>
} }