From 6fddac024531686e40dfc554937aec6a02c4b7a9 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sat, 30 Apr 2016 13:24:13 -0400 Subject: [PATCH] try fixing drag to move --- contrib/js/backlink.js | 3 ++- contrib/static/nntpchan.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/js/backlink.js b/contrib/js/backlink.js index eb438b3..ee9ccb5 100644 --- a/contrib/js/backlink.js +++ b/contrib/js/backlink.js @@ -262,7 +262,8 @@ function init(prefix) { rpl.setPrefix(prefix); var e = rpl.elem; e.setAttribute("draggable", "true"); - e.ondrop = function(ev) { + e.ondragend = function(ev) { + console.log(ev); e.style.top = ev.y; e.style.left = ev.x; } diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 3aec898..5bfca9a 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -37,7 +37,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