Save the state of a changed map location.
Prevent map tracking state from being reloaded each time a new item is collected.
This commit is contained in:
parent
e5de8b8fa8
commit
4c69d52927
@ -1144,8 +1144,8 @@ function drawMarkers(){
|
||||
for ( i = 0; i < markers.length; i++){
|
||||
if (markers[i].elem=="") {
|
||||
markers[i].elem = document.createElement("img");
|
||||
markers[i].elem.setAttribute("src","images/marker0.png");
|
||||
}
|
||||
markers[i].elem.setAttribute("src","images/marker0.png");
|
||||
markers[i].elem.setAttribute("class","markera");
|
||||
markers[i].elem.id = markers[i].itemName + "("+Math.round((markers[i].x-markers[i].gridObj.xoffset)/markers[i].gridObj.xgrid)+","+Math.round((markers[i].y-markers[i].gridObj.yoffset)/markers[i].gridObj.ygrid)+")";
|
||||
markers[i].elem.style.left = markers[i].x + "px";
|
||||
|
@ -138,7 +138,7 @@ function toggleItem(e){
|
||||
|
||||
addEventListener('contextmenu', function(e) {
|
||||
e.preventDefault();
|
||||
if (( e.target.className == "markera" ) || ( e.target.className == "markerb" )){
|
||||
if (( e.target.className == "markera" ) || ( e.target.className == "markerb" ) || ( e.target.className == "markerc" ) || ( e.target.className == "markerd" ) || ( e.target.className == "markere" )){
|
||||
var clicked = document.getElementById(e.target.id);
|
||||
var clickedSrc = clicked.getAttribute("src");
|
||||
var type = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user