Disable quality settings that aren't available and change map quality
This commit is contained in:
parent
e4b3897ac4
commit
57c1d01fc7
@ -120,7 +120,13 @@ function MapSettings({
|
||||
onChange={(e) => onSettingsChange("quality", e.target.value)}
|
||||
>
|
||||
{qualitySettings.map((quality) => (
|
||||
<option key={quality.id} value={quality.id}>
|
||||
<option
|
||||
key={quality.id}
|
||||
value={quality.id}
|
||||
disabled={
|
||||
quality.id !== "original" && !map.resolutions[quality.id]
|
||||
}
|
||||
>
|
||||
{quality.name}
|
||||
</option>
|
||||
))}
|
||||
|
@ -25,9 +25,9 @@ const defaultMapProps = {
|
||||
};
|
||||
|
||||
const mapResolutions = [
|
||||
{ size: 512, quality: 0.25, id: "low" },
|
||||
{ size: 1024, quality: 0.5, id: "medium" },
|
||||
{ size: 2048, quality: 0.75, id: "high" },
|
||||
{ size: 512, quality: 0.5, id: "low" },
|
||||
{ size: 1024, quality: 0.6, id: "medium" },
|
||||
{ size: 2048, quality: 0.7, id: "high" },
|
||||
{ size: 4096, quality: 0.8, id: "ultra" },
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user