try fix
This commit is contained in:
parent
d1f540f99a
commit
98b2834bd1
@ -153,9 +153,7 @@ DynReply.prototype.translate = function(dx, dy) {
|
|||||||
var x = this.x + dx;
|
var x = this.x + dx;
|
||||||
var y = this.y + dy;
|
var y = this.y + dy;
|
||||||
this.moveTo(x, y);
|
this.moveTo(x, y);
|
||||||
} else {
|
};
|
||||||
this.moveTo(dx, dy);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DynReply.prototype.moveTo = function(x,y) {
|
DynReply.prototype.moveTo = function(x,y) {
|
||||||
@ -165,7 +163,7 @@ DynReply.prototype.moveTo = function(x,y) {
|
|||||||
this.elem.setAttribute("style", "top: "+y+"px; right: "+nx+"px;");
|
this.elem.setAttribute("style", "top: "+y+"px; right: "+nx+"px;");
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
console.log(this.x, this.y);
|
console.log(this, this.x, this.y);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("!!", x, y);
|
console.log("!!", x, y);
|
||||||
|
@ -55,8 +55,8 @@ elem=document.createElement("input");elem.setAttribute("name","subject");elem.se
|
|||||||
table.appendChild(tbody);this.form.appendChild(table);this.elem.appendChild(this.form);document.body.appendChild(this.elem);this.board=null;this.roothash=null;this.prefix=null;this.url=null;this.moveTo(1,1);}
|
table.appendChild(tbody);this.form.appendChild(table);this.elem.appendChild(this.form);document.body.appendChild(this.elem);this.board=null;this.roothash=null;this.prefix=null;this.url=null;this.moveTo(1,1);}
|
||||||
DynReply.prototype.getX=function(){return this.x;}
|
DynReply.prototype.getX=function(){return this.x;}
|
||||||
DynReply.prototype.getY=function(){return this.y;}
|
DynReply.prototype.getY=function(){return this.y;}
|
||||||
DynReply.prototype.translate=function(dx,dy){if(this.x&&this.y){var x=this.x+dx;var y=this.y+dy;this.moveTo(x,y);}else{this.moveTo(dx,dy);}}
|
DynReply.prototype.translate=function(dx,dy){if(this.x&&this.y){var x=this.x+dx;var y=this.y+dy;this.moveTo(x,y);};}
|
||||||
DynReply.prototype.moveTo=function(x,y){if(x&&y){var nx=document.body.clientLeft-x;if(nx>0&&y>0&&nx<document.body.clientWidth&&y<document.body.clientHeight){this.elem.setAttribute("style","top: "+y+"px; right: "+nx+"px;");this.x=x;this.y=y;console.log(this.x,this.y);}}else{console.log("!!",x,y);}}
|
DynReply.prototype.moveTo=function(x,y){if(x&&y){var nx=document.body.clientLeft-x;if(nx>0&&y>0&&nx<document.body.clientWidth&&y<document.body.clientHeight){this.elem.setAttribute("style","top: "+y+"px; right: "+nx+"px;");this.x=x;this.y=y;console.log(this,this.x,this.y);}}else{console.log("!!",x,y);}}
|
||||||
DynReply.prototype.update=function(){if(this.prefix){this.updateCaptcha();if(this.board&&this.roothash){var ref=document.getElementById("postform_reference");ref.setAttribute("value",this.roothash);this.url=this.prefix+"post/"+this.board+"?t=json";}}}
|
DynReply.prototype.update=function(){if(this.prefix){this.updateCaptcha();if(this.board&&this.roothash){var ref=document.getElementById("postform_reference");ref.setAttribute("value",this.roothash);this.url=this.prefix+"post/"+this.board+"?t=json";}}}
|
||||||
DynReply.prototype.show=function(){console.log("show dynreply");this.update();this.elem.style.display='inline';}
|
DynReply.prototype.show=function(){console.log("show dynreply");this.update();this.elem.style.display='inline';}
|
||||||
DynReply.prototype.hide=function(){console.log("hide dynreply");this.elem.style.display="none";}
|
DynReply.prototype.hide=function(){console.log("hide dynreply");this.elem.style.display="none";}
|
||||||
|
Reference in New Issue
Block a user