// xxx deployment note: need a whole bunch of domains for SSE conn limit
-status_node = document.getElementById('spong');
+status_node = document.getElementById('status');
status_node.innerHTML = 'js-done'
var our_dnd_type = "text/puvnex-game-server-dummy";
dragthresh = 5;
+space = document.getElementById('space');
console.log('foo1');
}
function drag_mousemove(e) {
- ddx = e.clientX - dcx;
- ddy = e.clientY - dcy;
+ ctm = space.getScreenCTM();
+ ddx = (e.clientX - dcx)/ctm.a;
+ ddy = (e.clientY - dcy)/ctm.d;
if (!dragging) {
ddr2 = ddx*ddx + ddy*ddy;
if (ddr2 > dragthresh) {
<title>T</title>
</head>
<body>
-<div id="spong">nothing</div>
+<div id="status">nothing</div>
<p>
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"
+ <svg id="space"
+ xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"
ondragstart="test_dragstart(event)"
>
<rect fill="green" x="42" y="56" width="100" height="80"/>