Commit Graph

91 Commits

Author SHA1 Message Date
James Lyne
625e44a048 Remove per world default zoom, use per map instead 2022-02-27 20:42:47 +00:00
James Lyne
f4481a1d6c Move and rename player image util methods 2022-02-26 14:42:17 +00:00
James Lyne
f794dcb813 Guess overviewer world dimensions from world name 2022-02-26 13:52:24 +00:00
James Lyne
6373c52729 Use initial page title for overviewer maps 2022-02-26 13:24:48 +00:00
James Lyne
a15e9d4b77 Overviewer overlay layers 2022-02-26 01:02:56 +00:00
James Lyne
80bb800e04 Preparation for overlay TileLayers 2022-02-26 01:02:32 +00:00
James Lyne
bf300d977c Overviewer spawn marker 2022-02-24 22:53:26 +00:00
James Lyne
87a1665d53 Rename GenericMarker dimensions to iconSize and make optional 2022-02-24 21:08:27 +00:00
James Lyne
bd13e67f48 Replace MapProvider.getMarkerIconURL with passing full URL to GenericMarker 2022-02-24 18:39:37 +00:00
James Lyne
3e1122d34d Use overviewer hovertext as marker tooltip 2022-02-23 23:22:51 +00:00
James Lyne
0c6eadd25f Overviewer cleanup 2022-02-23 22:33:31 +00:00
James Lyne
40ee948d91 Replace MapProvider.getTilesUrl with LiveAtlasMapDefinition baseUrl option 2022-02-23 22:32:59 +00:00
James Lyne
1c5351313f LiveAtlasMapDefinition cleanup
- Reorganise options for improved readability
- Make options with defaults optional
- Add baseUrl option for later TileLayer use
2022-02-23 22:31:50 +00:00
James Lyne
c4f2d106bf All per-map default zoom 2022-02-23 14:31:31 +00:00
James Lyne
61b2a59e2a All per-map center points 2022-02-23 13:57:41 +00:00
James Lyne
1481207a12 More overviewer work
- First pass at markers
- Cleanup
2022-02-23 00:48:10 +00:00
James Lyne
50aba2dd7b MapProvider changes
- Add populateMap method to allow reacting to  the current map changes
- populateWorld, startUpdates and stopUpdates are no longer abstract
2022-02-23 00:42:53 +00:00
James Lyne
3eb9446a5d Ignore overlays for now 2022-02-21 22:58:55 +00:00
James Lyne
88f81efcf5 Update copyright headers 2022-02-21 21:53:49 +00:00
James Lyne
b43f1f0fe6 Basic support for overviewer 2022-02-21 21:50:31 +00:00
James Lyne
dfcaa6bf42 Support dynmap tilescale 2022-02-17 19:38:03 +00:00
James Lyne
af8f197a3e More robust Squaremap fill/stroke checks. Fixes #359 2022-02-15 16:45:04 +00:00
James Lyne
b3e593897b Replace MapProvider.getPlayerHeadUrl method with imageUrl property in players component
- imageUrl expects a function taking a HeadQueueEntry and returning a string
- The dynmap provider has fixed logic for image URLs, but squaremap can vary per world.
- Changes to imageUrl do not yet trigger image updates or head cache clearing
2022-02-05 17:31:07 +00:00
James Lyne
0b6bf8d206 Merge playerMarkers and playerList components in store state
- Merged playerMarkers and playerList into players
- playerMarkers is now players.markers
- Moved grayHiddenPlayers outside of players.markers, as it doesn't apply to markers
2022-02-05 15:41:48 +00:00
James Lyne
e91f820322 Improve handing of append_to_world
- Always use the store map list for checking for/retrieving maps, to avoid the non-unique map name problem append_to_world otherwise causes
- Change LiveAtlasWorldDefinition maps property to Set as map keys were not unique if appended maps with the same names existed
- Add appended map to both original and appended world's map set. The appended world needs this to display the map in the UI, the original world needs this to avoid situations where LiveAtlas needs the "first" map of a world, and that world has 0 non-appended maps (i.e switching worlds when following, URL without a map name)
- Add an appendedWorld property to maps to indicate when a map has been appended. This is used by MapContextMenu to show the appended world's map list instead, and in WorldListItem to filter out maps appended to other worlds
- Use the map's world property instead of the world prop in the template for WorldListItem. This fixes tooltips and prevents duplicate IDs.

Fixes #345
2022-02-04 21:58:07 +00:00
James Lyne
80fe8916f3 Refactor config loading
- Move config validation into map providers
- Move TileLayer creation into map providers
- Simplify config loading logic
2022-01-21 20:20:01 +00:00
James Lyne
aaf4ee630d Precalculate bounds for path markers 2022-01-16 21:18:48 +00:00
James Lyne
42e553bda7 Marker storage/display improvements
- Store markers of all types for a marker set in a single map
- Merge all marker type components into a single Markers component
- Add marker type prefixes to dynmap marker ids to ensure they remain unique
- Add id and type properties to marker objects
- Remove now-unused update handler for specific marker types
2022-01-15 15:45:59 +00:00
James Lyne
9abd96ccb1 Overhaul marker update handling
- Renamed pendingSetUpdates to pendingMarkerUpdates
- pendingMarkerUpdates is now a simple array of LiveAtlasMarkerUpdates
- Added separate ADD_MARKER_UPDATES mutation for marker updates
- Set updates via ADD_MARKER_SET_UPDATES are applied immediately and not stored in state
- Removed all marker pop actions and mutations except POP_MARKER_UPDATES, which now returns all marker types
- Added centralised markup update handler in markers.ts, replacing much of the logic in the individual marker type components. Allows additional handlers to be registered for specific marker sets and types
2022-01-15 00:07:25 +00:00
James Lyne
61b6b820aa Combine buildArea/buildRectangle in Pl3xmapMapProvider 2022-01-14 20:52:37 +00:00
James Lyne
e800b9fb73 Pl3xmap tooltip fixes 2022-01-14 20:11:43 +00:00
James Lyne
b3a685e003 Add location property for all marker types
Areas/lines will calculate a center point to use for their location
2022-01-14 20:11:43 +00:00
James Lyne
234b2d0a6b Store plain text version of HTML marker tooltip content 2022-01-14 13:53:43 +00:00
James Lyne
9c74d7b163 Marker changes
- Merge marker label/tooltipContent
- Rename tooltipContent/popupContent to tooltip/popup
- Set tooltip from label for all dynmap marker types
2022-01-13 16:07:27 +00:00
James Lyne
7cd21a19e2 Rename marker types for clarity
- Add "Marker" suffix
- Rename regular marker to "PointMarker"
2022-01-13 14:14:11 +00:00
James Lyne
ff77f09025 Move marker set contents outside the store, other small optimisations.
Improves marker set creation performance by avoiding traversal of all markers when watching the marker set.

Various other small changes to reduce allocations when creating markers
2022-01-11 16:08:30 +00:00
James Lyne
27231ff5ff Fix config hash handling in update response 2021-12-23 21:53:38 +00:00
James Lyne
fd0e11fac0 Handle pl3xmap world ordering 2021-12-10 16:36:32 +00:00
James Lyne
cbd6c7f3b9 Handle pl3xmap world default zoom 2021-12-10 15:54:55 +00:00
James Lyne
2ab03f8fde Handle pl3xmap player update interval 2021-12-10 15:54:30 +00:00
James Lyne
5a778828f8 Initial version of pl3xmap player facing. Closes #129 2021-12-09 01:13:23 +00:00
James Lyne
0c87849356 Use @types/dynmap where possible (Closes #224) 2021-11-12 00:22:52 +00:00
James Lyne
6c0837deae Improve session expiry handling
- Reload configuration and show login dialog when any request fails with "login required"
- Current map position etc is lost, more work needed here
2021-09-30 20:13:23 +01:00
James Lyne
8f794d044f Support Pl3xmap custom world icons 2021-09-30 15:04:01 +01:00
James Lyne
ca1d90a739 Remove unused world/map properties 2021-09-30 13:16:39 +01:00
James Lyne
daee15dd3f Fix various issues with Pl3xmap world/map creation 2021-09-29 21:35:26 +01:00
James Lyne
dc479ca6e8 Support disabling player images in player list
- showplayerfacesinmenu in Dynmap
- Player image is removed entirely rather than mirroring Dynmap behaviour of showing a Steve head, to be consistent with player markers and chat.
- Images are also disabled in FollowTarget
2021-09-29 21:16:31 +01:00
James Lyne
bf383afb8d Support disabling player marker images
- showplayerfaces: false in Dynmap, player-tracker.nameplate.show-head: false in Pl3xmap
- Remove showSkin option in favour of 'none' image size
2021-09-29 19:58:39 +01:00
James Lyne
58199aaed0 Use large player image on Pl3xmap when both health/armor are enabled 2021-09-29 14:56:13 +01:00
James Lyne
66355dfe38 Decouple player image pixel size from PlayerMarker.
- Use single template image and set size after cloning
- Use util method to retrieve pixel size when needed
- Use LiveAtlasPlayerImageSize in getMinecraftHead
2021-09-29 14:33:52 +01:00