[chronojump] Fixed encoder analyze instantaneous if !showPosition since polygon drawing



commit f32401c213fb740793c281799813ede6ac6fed0d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Oct 1 17:42:08 2019 +0200

    Fixed encoder analyze instantaneous if !showPosition since polygon drawing

 encoder/graph.R | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 6ef6e0a7..9e05c6fe 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -728,7 +728,8 @@ paint <- function(displacement, eccon, xmin, xmax, xrange, yrange, knRanges, pai
                         propulsiveEnd = length(eccentric) + length(isometric) + propulsiveEnd
         }
 
-       if(paintMode != "superpose") {
+       #draw polygon under position, but only if position is shown
+       if(paintMode != "superpose" && showPosition) {
                polygon(c(startX:propulsiveEnd, propulsiveEnd, startX),
                        c(yValues[startX:propulsiveEnd], min(yValues), min(yValues)),
                        col="grey90")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]