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