refactor: nearest-first earthquake list, drop the map and its libraries - #3
Open
renatgalimov wants to merge 5 commits into
Open
refactor: nearest-first earthquake list, drop the map and its libraries#3renatgalimov wants to merge 5 commits into
renatgalimov wants to merge 5 commits into
Conversation
…it app.js into maths, render and app layers
Same app, less of it. Own code goes from ~990 lines to ~450. - merge maths.js and render.js into app.js; both files are gone - the map label is now a Leaflet tooltip, so Leaflet places it. Drops the screen projection, the label-area measuring, the card position clamping and the leader-line geometry (~200 lines) - only quakes currently on screen can be labelled, which is one call to map.getBounds().contains instead of the old on-screen test - drop the Pacific-centred world view. It needed every longitude wrapped and the whole map drawn twice to fill past the date line. Map is now centred on 0, so wrapLongitude, shiftGeoJsonEast and drawWorldCopies go - magnitude colours move from CSS variables into app.js, so pickMagnitudeColor no longer reads them back out of the stylesheet - the screen scale factor is worked out once at startup instead of being re-read inside six draw functions - add magnitudeOf/locationOf/timeOf so nothing else has to know that coordinates[1] means latitude - the map now stops where the rail starts, so nothing drawn can hide under it Kept as they were: config and readSetting, pickMagnitudeColor, the plate boundaries, Leaflet and the offline world data. No change to the settings, the feed, or what the player sees apart from the world view no longer being Pacific-centred.
Sir-Monke
force-pushed
the
initial-simple-simple
branch
from
August 13, 2026 09:13
db8de8b to
82c0bd2
Compare
Sir-Monke
force-pushed
the
initial-simple-simple
branch
from
August 13, 2026 09:35
82c0bd2 to
3fc574c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.