Own subsea cables land on the city's dot, nudged cities too (#305)

An own cable's map line came straight from its surveyed lon/lat path, so it
ended at the city's exact coordinates, while the city itself is drawn with its
display nudge (CITY_NUDGE). Fujairah's [1,2] left every own cable there 2 px
above the dot; Dubai, Karachi, Barcelona and Osaka are off by more. The ends of
the map line now sit on the drawn city, as commercial cables already do; the
saved path and its length are unchanged.
This commit is contained in:
Frederic Jung 2026-11-06 01:50:40 +00:00
parent dd6e4f4f8a
commit 7f3b742451
No known key found for this signature in database
5 changed files with 35 additions and 3 deletions

View file

@ -93,7 +93,7 @@ test('orders, previews, saved paths and map geometry agree; legacy cables retain
ev('S=migrate(JSON.parse(JSON.stringify(S)));GEO.clear()');
assert.deepEqual(JSON.parse(ev('JSON.stringify(S.links.at(-1).seaPath)')), q.pts);
assert.deepEqual(JSON.parse(ev('JSON.stringify(linkGeom(S.links.at(-1)).pts)')),
JSON.parse(ev('JSON.stringify(seaMapPoints(S.links.at(-1).seaPath))')));
JSON.parse(ev('JSON.stringify(seaMapPoints(S.links.at(-1).seaPath,"lag","bde"))')));
ev("UI.dfSrc='cable';openLinkModal('lag','bde')");
}
ev("S.links.push({id:'legacy',a:'lag',b:'bde',kind:'df',own:true,sub:true,seaDesign:'optimized',sys:'roadm',km:7515,ch:[],ready:0,mo:1,cut:0});S=migrate(JSON.parse(JSON.stringify(S)))");