This commit is contained in:
NewHappyRabbit
2025-02-13 14:43:23 +02:00
10 changed files with 38 additions and 20 deletions
+1 -1
View File
@@ -190,7 +190,7 @@ export class TransformHandler {
this.scale /= zoomFactor;
// Clamp the scale to prevent extreme zooming
this.scale = Math.max(0.5, Math.min(20, this.scale));
this.scale = Math.max(0.2, Math.min(20, this.scale));
const canvasRect = this.boundingRect();
const canvasX = event.x - canvasRect.left;
@@ -379,6 +379,7 @@ export class EventsDisplay extends LitElement implements Layer {
>
<table
class="w-full border-collapse bg-black bg-opacity-60 text-white shadow-lg lg:text-xl text-xs"
style="pointer-events: auto;"
>
<tbody>
${this.events.map(
+1 -1
View File
@@ -66,7 +66,7 @@ export class TerritoryLayer implements Layer {
this.game.updatesSinceLastTick()[GameUpdateType.Unit].forEach((u) => {
const update = u as UnitUpdate;
if (update.unitType == UnitType.DefensePost && update.isActive) {
const tile = this.game.ref(update.pos.x, update.pos.y);
const tile = update.pos;
this.game
.bfs(
tile,