summaryrefslogtreecommitdiff
path: root/public/js/p5_custom.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/p5_custom.js')
-rw-r--r--public/js/p5_custom.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/js/p5_custom.js b/public/js/p5_custom.js
index 2cf742b..19a8dd0 100644
--- a/public/js/p5_custom.js
+++ b/public/js/p5_custom.js
@@ -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
}