Commit Graph

141 Commits

Author SHA1 Message Date
James Lyne
70b5b4eb47 Refactor GenericIcon 2022-02-24 21:54:25 +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
60d84d61a0 Fixed layout for marker icons with no iconSize 2022-02-24 00:32:30 +00:00
James Lyne
56b07aeaf7 Fix error showing label on markers without an iconSize 2022-02-23 23:23:10 +00:00
James Lyne
40ee948d91 Replace MapProvider.getTilesUrl with LiveAtlasMapDefinition baseUrl option 2022-02-23 22:32:59 +00:00
James Lyne
b69a1b3a3f Make iconSize optional for GenericIcon, and center it if missing 2022-02-23 00:47:22 +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
dfcaa6bf42 Support dynmap tilescale 2022-02-17 19:38:03 +00:00
James Lyne
971cd72af5 Update leaflet 2022-02-06 20:08:27 +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
c7c17af6d5 Fix point marker icon updates 2022-01-22 12:05:54 +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
f47bf8e691 Use HTML tooltip for marker display when it exists 2022-01-15 15:50:27 +00:00
James Lyne
46fc602a96 Fix incorrect argument type for DynmapTileLayer.getTileInfo 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
421c72dba7 Fix inactive maps stealing pending tile updates 2021-12-16 00:33:41 +00:00
James Lyne
5a778828f8 Initial version of pl3xmap player facing. Closes #129 2021-12-09 01:13:23 +00:00
James Lyne
3355dbbd32 Add compactPlayerMarkers ui option for pre-2.0 style markers 2021-12-07 21:53:09 +00:00
James Lyne
935cba1c0f Fix marker popups not displaying on click (Fixes #261) 2021-12-07 20:18:49 +00:00
James Lyne
0c87849356 Use @types/dynmap where possible (Closes #224) 2021-11-12 00:22:52 +00: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
5896d4504c Fix PlayerMarker name disappearing when hidden 2021-09-29 15:31:09 +01:00
James Lyne
016b784634 Fix PlayerMarker health/armor not displaying immediately 2021-09-29 15:02:17 +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
James Lyne
07d851fc86 Use 20 for health/armor meter max 2021-09-29 14:32:12 +01:00
James Lyne
770c9242a8 Player marker improvements
- Use <meter> for health/armor
- Condense small/body image properties into single image size option
- Remove image-size dependant margins
- Add circle alongside label for indicating player position
2021-09-29 01:30:35 +01:00
James Lyne
bfc0a381a8 Respect pl3xmap show-armor setting 2021-09-28 18:54:51 +01:00
James Lyne
bfd2b4083f Fix type errors 2021-09-12 20:37:51 +01:00
James Lyne
0e57a50e0c Cleanup redundant useStore calls 2021-09-08 15:21:27 +01:00
James Lyne
eb7d31669f Fix build 2021-09-01 17:47:29 +01:00
James Lyne
77b9850ea9 Marker refactoring
- Don't extend DivIcon as we don't use anything that class provides
- Update PlayerMarker icon using internal watch
- Remove unused panTo() PlayerMarker method
- Apply needed parts of _setIconStyles directly in GenericIcon's createIcon
2021-09-01 17:38:42 +01:00
James Lyne
0b05ad05e4 Focus login button when closing modal 2021-08-31 17:45:37 +01:00
James Lyne
3cb9f8f315 Fix super call in GenericIcon 2021-08-31 16:41:11 +01:00
James Lyne
fdf5e521d8 Prefer using super over prototype calls 2021-08-31 16:38:19 +01:00
James Lyne
0ae42a9409 Fix typings for LiveAtlasTileLayer _tiles property 2021-08-31 16:35:30 +01:00
James Lyne
00483025cd Correctly cleanup CoordinatesControl event handlers 2021-08-31 16:00:11 +01:00
James Lyne
f1d38e7485 Fix layer control error when switching servers 2021-08-31 15:55:39 +01:00
James Lyne
9fd53d754e Reduce CoordinatesControl layout shifts 2021-08-31 15:03:32 +01:00
James Lyne
76f151a64c First attempt at login/register 2021-08-30 22:28:20 +01:00
James Lyne
ec115615d1 Fix build with Typescript 4.4 2021-08-27 02:40:25 +01:00
James Lyne
ca8142cca8 Use declare for leaflet defined fields 2021-08-26 21:40:54 +01:00
James Lyne
89c56e176b Some style refactoring
- Use CSS variables for UI element size/spacing
- Make buttons smaller on smaller screens
- Reduce location size on smaller screens
- Add common leaflet-control-button class for all button-y controls
2021-08-26 00:54:40 +01:00
James Lyne
2d485ac4e5 Fix marker labels disappearing when toggling a showLabels: true layer twice 2021-08-16 04:21:48 +01:00
James Lyne
552b289bb9 Avoid recreating tiles from scratch when refreshing Pl3xmap 2021-08-16 03:33:28 +01:00
James Lyne
f316c0dd50 Use fetch for tile loads, move loading logic to LiveAtlasTileLayer 2021-08-16 03:08:35 +01:00