Image Sizing (issue #345)

The problem: a 357 × 366 snippet cut from a 1677 × 380 gram is drawn larger than the image itself, axis labels and all.

The change: an optional config row, image-sizing, chooses how big a gram is drawn, and its default is now screen:

Under screen and native every gram gets the expand button, the snippet included; under legacy only landscape grams do.

Why before may look different here than on the target network: the legacy large gram is 1200 CSS pixels wide. On a 1920-pixel screen scaled to 125% the window is about 1536 CSS pixels, so 1200 nearly fills it; on a wider or unscaled screen it leaves a gap. Compare the scale factor below with the target network's.

This display: … screen pixels per CSS pixel, window … CSS pixels wide. Under each gram is the size it is drawn at, in CSS pixels.

Large gram, 1677 × 380 before — legacy

Large spectrogram
time-start0
time-end60
freq-start0
freq-end500
image-sizinglegacy

Snippet, 357 × 366 before — legacy

Snippet spectrogram
time-start0
time-end58
freq-start185
freq-end291
image-sizinglegacy

Large gram, 1677 × 380 after — default

Large spectrogram
time-start0
time-end60
freq-start0
freq-end500

Snippet, 357 × 366 after — default

Snippet spectrogram
time-start0
time-end58
freq-start185
freq-end291