feat(map): refine sector inspector styling
This commit is contained in:
@@ -31,6 +31,11 @@ test("canonical defaults preserve the exact effective MMAP/MOSCOWMAP five-LOD do
|
||||
volumeMinimumHeightMeters: _volumeMinimumHeightMeters,
|
||||
volumeMaximumHeightMeters: _volumeMaximumHeightMeters,
|
||||
volumeBandHeightMeters: _volumeBandHeightMeters,
|
||||
selectionFillColor: _selectionFillColor,
|
||||
selectionFillOpacityPercent: _selectionFillOpacityPercent,
|
||||
selectionOutlineColor: _selectionOutlineColor,
|
||||
selectionOutlineWidthPx: _selectionOutlineWidthPx,
|
||||
selectionOutlineOpacityPercent: _selectionOutlineOpacityPercent,
|
||||
...profile
|
||||
}) => profile);
|
||||
assert.deepEqual(donorProfiles, [
|
||||
@@ -168,12 +173,17 @@ test("canonical defaults preserve the exact effective MMAP/MOSCOWMAP five-LOD do
|
||||
volumeMinimumHeightMeters: profile.volumeMinimumHeightMeters,
|
||||
volumeMaximumHeightMeters: profile.volumeMaximumHeightMeters,
|
||||
volumeBandHeightMeters: profile.volumeBandHeightMeters,
|
||||
selectionFillColor: profile.selectionFillColor,
|
||||
selectionFillOpacityPercent: profile.selectionFillOpacityPercent,
|
||||
selectionOutlineColor: profile.selectionOutlineColor,
|
||||
selectionOutlineWidthPx: profile.selectionOutlineWidthPx,
|
||||
selectionOutlineOpacityPercent: profile.selectionOutlineOpacityPercent,
|
||||
})), [
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: true, majorLineWidthMultiplier: 2.5, volumeEnabled: true, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 300, volumeBandHeightMeters: 300 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: true, majorLineWidthMultiplier: 2.5, volumeEnabled: true, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: true, majorLineWidthMultiplier: 2.5, volumeEnabled: true, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 300, volumeBandHeightMeters: 300, selectionFillColor: "#35cfff", selectionFillOpacityPercent: 10, selectionOutlineColor: "#35cfff", selectionOutlineWidthPx: 6.25, selectionOutlineOpacityPercent: 95 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: true, majorLineWidthMultiplier: 2.5, volumeEnabled: true, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500, selectionFillColor: "#35cfff", selectionFillOpacityPercent: 10, selectionOutlineColor: "#35cfff", selectionOutlineWidthPx: 6.25, selectionOutlineOpacityPercent: 95 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500, selectionFillColor: "#35cfff", selectionFillOpacityPercent: 16, selectionOutlineColor: "#35cfff", selectionOutlineWidthPx: 5, selectionOutlineOpacityPercent: 95 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500, selectionFillColor: "#35cfff", selectionFillOpacityPercent: 12, selectionOutlineColor: "#35cfff", selectionOutlineWidthPx: 3, selectionOutlineOpacityPercent: 95 },
|
||||
{ majorLinesEnabled: true, majorLabelsEnabled: false, majorLineWidthMultiplier: 2, volumeEnabled: false, volumeMinimumHeightMeters: 0, volumeMaximumHeightMeters: 500, volumeBandHeightMeters: 500, selectionFillColor: "#35cfff", selectionFillOpacityPercent: 12, selectionOutlineColor: "#35cfff", selectionOutlineWidthPx: 3, selectionOutlineOpacityPercent: 95 },
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -210,6 +220,11 @@ test("every LOD owns independent metric and angular spacing and visual fields",
|
||||
graticuleLineWidthPx: 1 + (index % 3),
|
||||
graticuleColor: `#00000${index}`,
|
||||
graticuleOpacity: 30 + index,
|
||||
selectionFillColor: `#12345${index}`,
|
||||
selectionFillOpacityPercent: 40 + index,
|
||||
selectionOutlineColor: `#abcde${index}`,
|
||||
selectionOutlineWidthPx: 4 + index,
|
||||
selectionOutlineOpacityPercent: 70 + index,
|
||||
}));
|
||||
const profile = gridLodProfile({ ...settings, gridLodProfiles: profiles }, 3);
|
||||
assert.equal(profile.stepKm, 14);
|
||||
@@ -218,6 +233,29 @@ test("every LOD owns independent metric and angular spacing and visual fields",
|
||||
assert.equal(profile.graticuleLineWidthPx, 1);
|
||||
assert.equal(profile.graticuleColor, "#000003");
|
||||
assert.equal(profile.graticuleOpacity, 33);
|
||||
assert.equal(profile.selectionFillColor, "#123453");
|
||||
assert.equal(profile.selectionFillOpacityPercent, 43);
|
||||
assert.equal(profile.selectionOutlineColor, "#abcde3");
|
||||
assert.equal(profile.selectionOutlineWidthPx, 7);
|
||||
assert.equal(profile.selectionOutlineOpacityPercent, 73);
|
||||
});
|
||||
|
||||
test("selection visuals clamp to their public UI contract and a 1,000 m band is accepted client-side", () => {
|
||||
const profile = gridLodProfile({
|
||||
...settings,
|
||||
gridLodProfiles: DEFAULT_GRID_LOD_PROFILES.map((item, index) => index === 0 ? {
|
||||
...item,
|
||||
volumeMaximumHeightMeters: 1_000,
|
||||
volumeBandHeightMeters: 1_000,
|
||||
selectionFillOpacityPercent: 110,
|
||||
selectionOutlineWidthPx: 30,
|
||||
selectionOutlineOpacityPercent: -5,
|
||||
} : item),
|
||||
}, 0);
|
||||
assert.equal(profile.volumeBandHeightMeters, 1_000);
|
||||
assert.equal(profile.selectionFillOpacityPercent, 100);
|
||||
assert.equal(profile.selectionOutlineWidthPx, 12);
|
||||
assert.equal(profile.selectionOutlineOpacityPercent, 0);
|
||||
});
|
||||
|
||||
test("legacy flat visuals migrate while angular graticule spacing stays independent", () => {
|
||||
|
||||
Reference in New Issue
Block a user