New wiki-page
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<style> | <style> | ||
#map-container{ | |||
position:relative; | |||
width:300px; | |||
height: | height:300px; | ||
} | } | ||
#map-svg{ | |||
position:absolute; | |||
left:0px; | |||
position: absolute; | top:0px; | ||
} | |||
#map-catcher{ | |||
position:absolute; | |||
left:0px; | |||
top:0px; | |||
height:100%; | |||
width:100%; | |||
} | } | ||
Line 21: | Line 22: | ||
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"> | <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"> | ||
RLQ.push(function () { | RLQ.push(function () { | ||
$( | $(document).ready(function () { | ||
$("#map-catcher").mousedown(function (e) { | |||
$("#coord").text("x:"+e.offsetX+", y:"+e.offsetY); | |||
}); | |||
}); | }); | ||
}); | }); | ||
</script> | </script> |
Revision as of 18:48, 9 August 2017
<style>
- map-container{
position:relative; width:300px; height:300px;
}
- map-svg{
position:absolute; left:0px; top:0px;
}
- map-catcher{
position:absolute; left:0px; top:0px; height:100%; width:100%;
}
</style> <script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"> RLQ.push(function () { $(document).ready(function () {
$("#map-catcher").mousedown(function (e) { $("#coord").text("x:"+e.offsetX+", y:"+e.offsetY); });
}); }); </script>