Archived
1
0

update drag to move for post form

This commit is contained in:
Jeff Becker 2016-04-30 13:19:34 -04:00
parent 3710ed884e
commit d52a63586f
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
2 changed files with 3 additions and 2 deletions

View File

@ -262,7 +262,8 @@ function init(prefix) {
var e = rpl.elem; var e = rpl.elem;
e.setAttribute("draggable", "true"); e.setAttribute("draggable", "true");
e.ondragover = function(ev) { e.ondragover = function(ev) {
console.log(ev); e.style.top = ev.y;
e.style.left = ev.x;
} }
} }

View File

@ -37,7 +37,7 @@ parent.appendChild(wrapper);parent.backlink=false;},function(msg){var wrapper=do
parent.backlink=true;}};parent.backlink=true;} 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<l;idx++){var e=elems[idx];ls.push(e);} function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx<l;idx++){var e=elems[idx];ls.push(e);}
for(var elem in ls){inject_hover(prefix,ls[elem]);}} for(var elem in ls){inject_hover(prefix,ls[elem]);}}
function init(prefix){inject_hover_for_element(document);var rpl=getReplyTo();var e=rpl.elem;e.setAttribute("draggable","true");e.ondragover=function(ev){console.log(ev);}} function init(prefix){inject_hover_for_element(document);var rpl=getReplyTo();var e=rpl.elem;e.setAttribute("draggable","true");e.ondragover=function(ev){e.style.top=ev.y;e.style.left=ev.x;}}
/* ./contrib/js/banner.js */ /* ./contrib/js/banner.js */
var banner_count=3;function nntpchan_inject_banners(elem,prefix){var n=Math.floor(Math.random()*banner_count);var banner=prefix+"static/banner_"+n+".jpg";var e=document.createElement("img");e.src=banner;e.id="nntpchan_banner";elem.appendChild(e);} var banner_count=3;function nntpchan_inject_banners(elem,prefix){var n=Math.floor(Math.random()*banner_count);var banner=prefix+"static/banner_"+n+".jpg";var e=document.createElement("img");e.src=banner;e.id="nntpchan_banner";elem.appendChild(e);}
/* ./contrib/js/expand-image.js */ /* ./contrib/js/expand-image.js */