This commit is contained in:
Loic Guegan 2021-10-05 15:50:11 +02:00
parent 442a9e9c85
commit c7c4048a44
3 changed files with 29 additions and 8 deletions

View file

@ -1,5 +1,5 @@
draw_arrow=function(p,x1,y1,x2,y2,elt=null,canvas,skiparrow=false){
draw_arrow=function(p,x1,y1,x2,y2,elt=null,canvas,skiparrow=false,flip=false){
var offset=5
// Reduce the length of the vector to have a better tip location
@ -30,6 +30,12 @@ draw_arrow=function(p,x1,y1,x2,y2,elt=null,canvas,skiparrow=false){
xfactor=1-yfactor
justify=15
if(flip){
xfactor=-xfactor
yfactor=-yfactor
}
if(angle>0){
yfactor=-yfactor
}