add some tolorance

This commit is contained in:
MathMan05 2024-11-06 16:12:12 -06:00
parent 49cdb8fda6
commit 673359ef65

View file

@ -208,11 +208,17 @@ class Message extends SnowFlake{
return this.owner.info; return this.owner.info;
} }
messageevents(obj: HTMLDivElement){ messageevents(obj: HTMLDivElement){
let drag=false;
Message.contextmenu.bindContextmenu(obj, this, undefined,(x)=>{ Message.contextmenu.bindContextmenu(obj, this, undefined,(x)=>{
//console.log(x,y); //console.log(x,y);
if(!drag&&x<20){
return
}
drag=true;
this.channel.moveForDrag(Math.max(x,0)); this.channel.moveForDrag(Math.max(x,0));
},(x,y)=>{ },(x,y)=>{
drag=false;
console.log(x,y); console.log(x,y);
this.channel.moveForDrag(-1); this.channel.moveForDrag(-1);
if(x>60){ if(x>60){