mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Credits keep their linked words: only the words a source linked are the link
A credit read from markup keeps the first link's own words as linkText, and the Cesium credit display and the credit line link just those words, as the source wrote them (Street Level's "© Mapillary contributors" links Mapillary only). The Street Level gate reads a drawn item's pick id from its draw-set id.
This commit is contained in:
1 parent
74673f3c85
commit
a7fe3eebc6
9 files changed
+123
-8
No files matched your search
@@ -292,11 +292,12 @@ test('data credits go through the renderer to the attribution list', async () =>
|
||||
assert.ok(shown.every((credit) => !credit.showOnScreen));
|
||||
const odbl = shown.find((credit) => credit.html.includes('opendatacommons'));
|
||||
assert.match(odbl.html, /href="https:\/\/opendatacommons.org/);
|
||||
assert.match(odbl.html, />\(ODbL\)</);
|
||||
// As the source wrote it: only the licence's name is the link.
|
||||
assert.match(odbl.html, /\(<a [^>]*>ODbL<\/a>\)/);
|
||||
assert.equal(registerDynamicCredit(viewer, TOMTOM_CREDIT), true);
|
||||
assert.equal(registerDynamicCredit(viewer, TOMTOM_CREDIT), true);
|
||||
assert.equal(shown.length, 4, 'a dynamic credit is added once');
|
||||
assert.match(shown[3].html, /Traffic flow data © TomTom/);
|
||||
assert.match(shown[3].html, /Traffic flow data © <a [^>]*>TomTom<\/a>/);
|
||||
assert.equal(registerDynamicCredit({}, { key: 'none', html: 'x' }), false);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user