mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
refactor(street-level): static legend in markup; drop empty panel wrappers
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
209dda5507
commit
7411ebaf1c
8 files changed
+56
-92
No files matched your search
@@ -5,12 +5,11 @@ import { createCredit } from './credits.js';
|
||||
import { createSelection } from './selection.js';
|
||||
import { createViewerHost } from './viewerHost.js';
|
||||
import { normalizeFilter, sameFilter } from './filter.js';
|
||||
import { COLORS, STREET_LEVEL_LAYER_ID } from './policy.js';
|
||||
import { STREET_LEVEL_LAYER_ID } from './policy.js';
|
||||
import { createCoverage } from './providers/mapillary/coverage.js';
|
||||
import { createSequences } from './providers/mapillary/sequences.js';
|
||||
import { createMapillaryViewer } from './providers/mapillary/viewer.js';
|
||||
import {
|
||||
COLORS as MAPILLARY_COLORS,
|
||||
MAPILLARY_CREDIT_HTML,
|
||||
MAPILLARY_KEY_ID,
|
||||
MAPILLARY_SOURCE_METHODS,
|
||||
@@ -169,16 +168,6 @@ export function createStreetLevelLayer({
|
||||
keyRejected,
|
||||
filter: { ...state.filter },
|
||||
coverage,
|
||||
legend: state.providerOn
|
||||
? [
|
||||
{
|
||||
key: 'mapillary',
|
||||
label: 'Mapillary',
|
||||
color: MAPILLARY_COLORS.coverage,
|
||||
},
|
||||
{ key: 'selected', label: 'Selected', color: COLORS.selected },
|
||||
]
|
||||
: [],
|
||||
sequence: {
|
||||
selectedId: state.sequence.selectedId,
|
||||
images: state.sequence.images.length,
|
||||
|
||||
@@ -139,7 +139,6 @@ test('the CC BY-SA credit shows while Mapillary is on and goes with it', async (
|
||||
assert.match(shown()[0], /CC BY-SA 4\.0/);
|
||||
layer.setParams({ mapillary: false });
|
||||
assert.deepEqual(shown(), [], 'hidden with the switch');
|
||||
assert.deepEqual(layer.getUIState().legend, [], 'no legend either');
|
||||
layer.setParams({ mapillary: true });
|
||||
assert.deepEqual(shown(), [MAPILLARY_CREDIT_HTML]);
|
||||
layer.disable();
|
||||
|
||||
Reference in new issue
Block a user