Update
This commit is contained in:
parent
c7c4048a44
commit
c353c87c51
3 changed files with 15 additions and 6 deletions
|
@ -40,8 +40,15 @@ draw_arrow=function(p,x1,y1,x2,y2,elt=null,canvas,skiparrow=false,flip=false){
|
|||
yfactor=-yfactor
|
||||
}
|
||||
|
||||
cp=canvas.position()
|
||||
elt.position(cp.x+center.x+justify*xfactor-5,cp.y+center.y-justify*yfactor-elt.elt.offsetHeight/2)
|
||||
cp=canvas.position()
|
||||
elt_x=cp.x+center.x+justify*xfactor-5
|
||||
elt_y=cp.y+center.y-justify*yfactor-elt.elt.offsetHeight/2
|
||||
if (elt_x<cp.x || elt_y < cp.y || elt_x>(canvas.width+cp.x) || elt_y>(canvas.height+cp.y)){
|
||||
elt.elt.style.display="none"
|
||||
} else {
|
||||
elt.elt.style.display="block"
|
||||
}
|
||||
elt.position(elt_x,elt_y)
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue