diff --git a/contrib/js/reply.js b/contrib/js/reply.js index 0498d5e..9026b4d 100644 --- a/contrib/js/reply.js +++ b/contrib/js/reply.js @@ -366,9 +366,9 @@ function init(prefix) { var e = rpl.elem; var mouseDownX, mouseDownY; - var originalX = window.screenX - 50; - var originalY = 10; - rpl.moveTo(originalX, originalY); + var ox = window.screenX - 50; + var oy = 10; + rpl.moveTo(ox, oy); e.setAttribute("draggable", "true"); @@ -382,10 +382,13 @@ function init(prefix) { }, false); e.addEventListener("dragend", function(ev) { - var dx = ev.screenX - mouseDownX; - var dy = ev.screenY - mouseDownY; + var dx = ox + ev.screenX - mouseDownX; + var dy = oy + ev.screenY - mouseDownY; + console.log(dx, dy); rpl.translate(dx, dy); + ox = rpl.x; + oy = rpl.y; }, false); // add replyto post handlers diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index b9ef3a8..12b3b3e 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -82,7 +82,7 @@ parent.appendChild(wrapper);parent.backlink=false;},function(msg){var wrapper=do parent.backlink=true;}};parent.backlink=true;} function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx