Commit Graph

589 Commits

Author SHA1 Message Date
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
68eccb2b5b Pass projection into LiveAtlasMapDefinition instead of creating it internally 2022-02-21 20:27:09 +00:00
James Lyne
59fbcfd8be Fix build warning 2022-02-20 19:40:35 +00:00
James Lyne
eba601e7fe Add option to disable map context menu 2022-02-20 19:35:10 +00:00
James Lyne
e3f1b72d8c Fix typo 2022-02-17 19:55:10 +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
c6948a7d50 Update some comments 2022-02-06 20:15:39 +00:00
James Lyne
971cd72af5 Update leaflet 2022-02-06 20:08:27 +00:00
James Lyne
6d27068702 Remove debug log 2022-02-06 13:04:27 +00:00
James Lyne
b144b817af Re-fetch player images if the imageUrl changes 2022-02-06 13:04:04 +00:00
James Lyne
b75d1022b7 Reuse player marker icons when removing and readding to map 2022-02-06 12:29:43 +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
db41a585e6 Add PlayerImage component for showing player images in various parts of the UI 2022-02-05 17:23:55 +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
9bb797f23a Fix context menu 2022-02-05 12:54:06 +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
f7b774321b Use template strings over array joins for map names 2022-02-04 20:36:10 +00:00
James Lyne
e2a89c28d0 Handle possible nested arrays when calculating Squaremap/Pl3xmap bounds from points 2022-01-31 22:36:25 +00:00
James Lyne
c7c17af6d5 Fix point marker icon updates 2022-01-22 12:05:54 +00:00
James Lyne
3ca7a72703 Fix player image not updating on follow target change 2022-01-22 12:03:40 +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
4535af754c Clear player head cache/queue on server change 2022-01-17 20:15:22 +00:00
James Lyne
b82c9f39d2 Only show "Show More" button if there is actually more to show. 2022-01-17 19:57:04 +00:00
James Lyne
c87ea083a0 Only center points that need centering 2022-01-17 19:21:52 +00:00
James Lyne
62f7b25fb5 Center point markers in their block to match player markers 2022-01-17 19:01:19 +00:00
James Lyne
d9ca473674 Cancel existing follow when manually switching worlds 2022-01-17 16:45:42 +00:00
James Lyne
91739d513a Markers sidebar section 2022-01-17 15:15:00 +00:00
James Lyne
9265f8a02a Scroll to top of list when searching players 2022-01-17 12:21:23 +00:00
James Lyne
14e67571b2 Use class for styling player search 2022-01-17 12:20:33 +00:00
James Lyne
f9eb7b1fd2 Fix typo in circle bounds 2022-01-16 23:24:12 +00:00
James Lyne
f906264021 Add global marker update handler which handles all marker sets 2022-01-16 23:21:22 +00:00
James Lyne
687a31f0f7 Refactor Map pan handling
- Add setView method to handle all panning/zooming
- Replaced SET_PAN_TARGET mutation with more generic SET_VIEW_TARGET which accepts locations/bounds/zooms and leaflet options
- Merged all scheduled variables into single scheduledView
2022-01-16 22:15:12 +00:00
James Lyne
aaf4ee630d Precalculate bounds for path markers 2022-01-16 21:18:48 +00:00
James Lyne
846f894502 Follow UI improvements
- Stick to bottom of screen
- Prevent layout shift when player visibility changes
- Increase image size
2022-01-16 00:50:10 +00:00
James Lyne
cfda231048 Rename marker layer utility methods 2022-01-15 18:45:01 +00:00
James Lyne
5391b2a34c Recreate tooltips on marker update 2022-01-15 16:00:19 +00:00
James Lyne
f47bf8e691 Use HTML tooltip for marker display when it exists 2022-01-15 15:50:27 +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
6b232f387b Rename markers.ts 2022-01-14 20:52:05 +00:00
James Lyne
e800b9fb73 Pl3xmap tooltip fixes 2022-01-14 20:11:43 +00:00
James Lyne
8382142cb2 Cleanup url getter 2022-01-14 20:11:43 +00:00
James Lyne
46fc602a96 Fix incorrect argument type for DynmapTileLayer.getTileInfo 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
d1edad952e Fix build 2022-01-14 14:38:58 +00:00
James Lyne
715aa8bd55 Add missing export 2022-01-14 14:38:43 +00:00