Move icon anchor to tip of icons
The spawn and location icons should now have the tip of the icon image point at the actual location. Previously, the icons were centred onto it, which was slightly off in the vertical direction.
This commit is contained in:
@@ -134,6 +134,7 @@ overviewer.util = {
|
|||||||
iconUrl: overviewerConfig.CONST.image.spawnMarker,
|
iconUrl: overviewerConfig.CONST.image.spawnMarker,
|
||||||
iconRetinaUrl: overviewerConfig.CONST.image.spawnMarker2x,
|
iconRetinaUrl: overviewerConfig.CONST.image.spawnMarker2x,
|
||||||
iconSize: [32, 37],
|
iconSize: [32, 37],
|
||||||
|
iconAnchor: [15, 33],
|
||||||
});
|
});
|
||||||
var latlng = overviewer.util.fromWorldToLatLng(ovconf.spawn[0],
|
var latlng = overviewer.util.fromWorldToLatLng(ovconf.spawn[0],
|
||||||
ovconf.spawn[1],
|
ovconf.spawn[1],
|
||||||
@@ -689,6 +690,7 @@ overviewer.util = {
|
|||||||
iconUrl: overviewerConfig.CONST.image.queryMarker,
|
iconUrl: overviewerConfig.CONST.image.queryMarker,
|
||||||
iconRetinaUrl: overviewerConfig.CONST.image.queryMarker2x,
|
iconRetinaUrl: overviewerConfig.CONST.image.queryMarker2x,
|
||||||
iconSize: [32, 37],
|
iconSize: [32, 37],
|
||||||
|
iconAnchor: [15, 33],
|
||||||
});
|
});
|
||||||
var locationm = L.marker(latlngcoords, { icon: locationIcon,
|
var locationm = L.marker(latlngcoords, { icon: locationIcon,
|
||||||
title: "Linked location"});
|
title: "Linked location"});
|
||||||
|
|||||||
Reference in New Issue
Block a user