Save the state of a changed map location.

Prevent map tracking state from being reloaded each time a new item is collected.
master
sigonasr2 5 years ago committed by GitHub
parent e5de8b8fa8
commit 4c69d52927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      scripts/locations.js
  2. 2
      scripts/main.js

@ -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…
Cancel
Save