Skip to content

Commit

Permalink
Merge pull request #22 from meta-hub/patch-1
Browse files Browse the repository at this point in the history
Update map2.html
  • Loading branch information
youngsinatra99 authored Feb 9, 2023
2 parents 2660be0 + 0f6a5f1 commit 3025548
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions html/map2.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@
r: 100,
n: 'VanHorn'
}];

var map = document.getElementById('map');
var info = document.getElementById('info');
var content = document.getElementById('content');
var selected = -1;
console.log('INIT HTML' + document.location.pathname)

onmousemove = function (e) {
// console.log("mouse location: " + e.clientX / w + " " + e.clientY / h)
info.innerHTML = "X: " + e.clientX / w + " Y: " + e.clientY / h;
//console.warn(points[0].x, points[0].y, w);

var show = false;
var i = 0
for (var p in points) {
Expand All @@ -102,7 +102,6 @@
}
function clickE(){
if (map.className != "") select();
console.log("FFF" + selected + " " + map.className);
}

function dist(x1, y1, x2, y2) {
Expand All @@ -111,18 +110,15 @@
return Math.sqrt(a * a + b * b);
}
function showMap(yes){
console.log('PYK');
if (yes) content.style.visibility = 'inherit';
else content.style.visibility = 'hidden';
}

function select(){
console.log("OK " + selected)
$.post(`http://${GetParentResourceName()}/select`, JSON.stringify(map.className));
}
</script>



</body>

</html>
</html>

0 comments on commit 3025548

Please sign in to comment.