small video improvements and bug fix
This commit is contained in:
@@ -194,15 +194,18 @@ def get_video_data(w,groups=['basic'],mode='water'):
|
||||
|
||||
for c in columns:
|
||||
if c != 'time':
|
||||
if dict(rowingmetrics)[c]['numtype'] == 'integer':
|
||||
data[c] = df2[c].astype(int).tolist()
|
||||
else:
|
||||
data[c] = df2[c].values.tolist()
|
||||
metrics[c] = {
|
||||
'name': dict(rowingmetrics)[c]['verbose_name'],
|
||||
'metric': c,
|
||||
'unit': ''
|
||||
}
|
||||
try:
|
||||
if dict(rowingmetrics)[c]['numtype'] == 'integer':
|
||||
data[c] = df2[c].astype(int).tolist()
|
||||
else:
|
||||
data[c] = df2[c].values.tolist()
|
||||
metrics[c] = {
|
||||
'name': dict(rowingmetrics)[c]['verbose_name'],
|
||||
'metric': c,
|
||||
'unit': ''
|
||||
}
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
metrics['boatspeed'] = metrics.pop('velo')
|
||||
# metrics['workperstroke'] = metrics.pop('driveenergy')
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
width: 100%; /* Width of the outside container */
|
||||
}
|
||||
|
||||
.bold { font-weight: bold; }
|
||||
|
||||
/* The slider itself */
|
||||
.slider {
|
||||
-webkit-appearance: none; /* Override default CSS styles */
|
||||
@@ -71,7 +73,7 @@
|
||||
<h1>Video Analysis for {{ workout.name }}</h1>
|
||||
<ul class="main-content">
|
||||
{% if user.is_authenticated and user == workout.user.user and not locked %}
|
||||
<li class="grid_4">
|
||||
<li class="grid_2">
|
||||
<p>Paste link to you tube video below</p>
|
||||
<p>Use the slider to locate start point for video on workout map</p>
|
||||
<p>Playing the video will advance the data in synchonization. Use the regular YouTube
|
||||
@@ -82,10 +84,12 @@
|
||||
<p>Once you are happy with the alignment, you can save the analysis, and share with other people.</p>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="grid_4">
|
||||
<li class="grid_2">
|
||||
<p>Playing the video will advance the data in synchronization. Use the regular
|
||||
YouTube controls to move around in the video and play it.</p>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="main-content">
|
||||
<li class="grid_2">
|
||||
<div id="theplot" class="flexplot mapdiv">
|
||||
{{ mapdiv | safe}}
|
||||
@@ -173,6 +177,7 @@
|
||||
// document.getElementById("catch").innerHTML = catchangle;
|
||||
{% for id, metric in metrics.items %}
|
||||
document.getElementById("{{ id }}").innerHTML = {{ id }}_now;
|
||||
document.getElementById("{{ id }}").className = 'bold';
|
||||
{% endfor %}
|
||||
{% for group in metricsgroups %}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user