diff --git a/scripts/locations.js b/scripts/locations.js index d233e5a..3a08bf7 100644 --- a/scripts/locations.js +++ b/scripts/locations.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"; diff --git a/scripts/main.js b/scripts/main.js index 43d9b49..2bef389 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -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;