Skip to content

Commit fe9c7f2

Browse files
committed
address pr comments
1 parent a2849d5 commit fe9c7f2

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/components/src/plot-container.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ const OUT_OF_SCREEN_POSITION = -9999;
4242
/**
4343
* Linearly remaps the export scale range [1..5] to a reduced legend scale [1..3].
4444
* Prevents the legend from scaling as aggressively as the exported image.
45-
* @param linearScale - scale factor (e.g., 1, 2, 3, 4, 5)
45+
* @param scale - scale factor (e.g., 1, 2, 3, 4, 5)
4646
* @returns remapped scale factor
4747
*/
48-
function calculateLogarithmicLegendScale(scale: number): number {
48+
function remapLegendScale(scale: number): number {
4949
const max = 5;
5050
const t = (scale - 1) / (max - 1);
5151
return 1 + t * 2;
@@ -332,7 +332,7 @@ export default function PlotContainerFactory(
332332
<StyledPlotContainer
333333
className="export-map-instance"
334334
style={{
335-
'--legend-scale': calculateLogarithmicLegendScale(scale)
335+
'--legend-scale': remapLegendScale(scale)
336336
} as React.CSSProperties}
337337
>
338338
<StyledMapContainer ref={plottingAreaRef} width={size.width} height={size.height}>

src/types/reducers.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ export type BaseMapStyle = {
372372

373373
export declare type ExportImage = {
374374
ratio: 'SCREEN' | 'FOUR_BY_THREE' | 'SIXTEEN_BY_NINE' | 'CUSTOM';
375-
resolution: 'ONE_X' | 'TWO_X';
375+
resolution: 'ONE_X' | 'TWO_X' | 'THREE_X' | 'FOUR_X' | 'FIVE_X';
376376
legend: boolean;
377377
mapH: number;
378378
mapW: number;

0 commit comments

Comments
 (0)