Private
Public Access
1
0

working sliders on line collection (force curve)

This commit is contained in:
Sander Roosendaal
2019-04-02 21:31:58 +02:00
parent 03c1923828
commit 50b7af86e1

View File

@@ -866,8 +866,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
var multilines2 = sourcemultiline2.data
var plottype = plottype
var multilinesx = multilines['xs']
var multilinesy = multilines['ys']
var multilinesx = multilines2['x']
var multilinesy = multilines2['y']
var x = data['x']
var y = data['y']
@@ -914,8 +914,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
datapoints['peakforceangle'] = []
datapoints['peakforce'] = []
multilines['xs'] = []
multilines['ys'] = []
multilines['x'] = []
multilines['y'] = []
for (i=0; i<c.length; i++) {
if (spm1[i]>=minspm && spm1[i]<=maxspm) {
@@ -926,10 +926,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
datapoints['peakforce'].push(peakforce[i])
}
if (plottype=='line') {
xs = [c[i],slip[i],peakforceangle[i],wash[i],finish[i]]
ys = [0,thresholdforce,peakforce[i],thresholdforce,finish[i]]
multilines['xs'].push(xs)
multilines['ys'].push(ys)
multilines['x'].push(multilinesx[i])
multilines['y'].push(multilinesy[i])
}
catchav += c[i]
finishav += finish[i]
@@ -967,6 +965,10 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
peakflabel.text = 'Fpeak: '+peakforceav.toFixed(2)
peakforceanglelabel.text = 'Peak angle: '+peakforceangleav.toFixed(2)
annolabel.text = annotation
console.log(count);
console.log(multilines['x'].length);
console.log(multilines['y'].length);
// source.trigger('change');
source.change.emit();