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 frontend/app/lib/map/chronicleGifFrame.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ describe("chronicleGifMarkerLayout", () => {
expect(layout.iconY + layout.iconSize / 2).toBeCloseTo(540);
});

it("scales a large settlement bigger than a small one", () => {
it("draws a large settlement icon at 90 map pixels", () => {
const t = chronicleGifTransform(MAP, MAP, 1080);
const small = chronicleGifMarkerLayout(t, marker())!;
const large = chronicleGifMarkerLayout(
t,
marker({ markerSize: "large" })
)!;
expect(large.iconSize).toBeGreaterThan(small.iconSize);
expect(large.iconSize).toBeCloseTo(small.iconSize * (90 / 100));
expect(large.fontSize).toBeGreaterThan(small.fontSize);
});

Expand Down
6 changes: 3 additions & 3 deletions frontend/app/lib/mapMarkers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ describe("mapMarkers", () => {
expect(resolveMarkerImageSrc("battle", "small")).toBe("/battle.png");
});

it("draws a large settlement icon at 75% of the original 160px", () => {
it("draws a large settlement icon at 90px", () => {
const layout = markerLayout(100, 200, "large", "settlement");
expect(layout.iconSize).toBe(120);
expect(layout.size).toBe(120);
expect(layout.iconSize).toBe(90);
expect(layout.size).toBe(90);
});

it("markerLayout centers icon on map coords", () => {
Expand Down
3 changes: 1 addition & 2 deletions frontend/app/lib/mapMarkers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export const MARKER_HOVER_TRANSITION = "transform 150ms ease-out";
export const MARKER_VISIBILITY_TRANSITION = "opacity 200ms ease-out";

export const MARKER_SMALL_PX = 100;
/** 75% of the original 160px large settlement icon. */
export const MARKER_LARGE_PX = 120;
export const MARKER_LARGE_PX = 90;
export const MARKER_LABEL_FONT_SMALL = 48;
export const MARKER_LABEL_FONT_LARGE = 72;
export const MARKER_LABEL_GAP = 2;
Expand Down
5 changes: 2 additions & 3 deletions frontend/app/lib/settlementMarkers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ describe("settlementMarkers", () => {

it("markerDimensions returns tier sizes", () => {
expect(markerDimensions("large").fontSize).toBe(SETTLEMENT_LABEL_FONT_LARGE);
expect(markerDimensions("small").size).toBeLessThan(
markerDimensions("large").size
);
expect(markerDimensions("large").size).toBe(90);
expect(markerDimensions("small").size).toBe(100);
});

it("shouldShowSettlementMarker gates on screen font size", () => {
Expand Down