more data in csv

This commit is contained in:
j 2018-12-05 17:44:19 +01:00
parent ed1e2a3360
commit 826b51704f
2 changed files with 8 additions and 3 deletions

View File

@ -100,8 +100,8 @@
<li>Global Speed: <input type="text" style="width:30px" value="20" class="default_speed"><button class="set_speed">set</button></li>
<h2>Export:</h2>
<li><a><button class="export_sequence">export sequence</button></a></li>
<li><a><button class="export_sequence_csv">export sequence (csv)</button></a></li>
<li><a><button class="export_presets">export presets</button></a></li>
<li><a><button class="export_sequence_csv">export csv</button></a></li>
<h2>Import:</h2>
<li><input class="import_sequence" type="file">import sequence</input></li>
<li><input class="import_presets" type="file">import presets</input></li>

View File

@ -498,7 +498,9 @@ function getPreset(id) {
function exportSequenceCSV() {
var position = 0;
return data.map(function(row) {
return [
['preset', 'name', 'time', 'duration', 'speed', 'sleep', 'elevation', 'azimuth', 'zoom']
].concat(data.map(function(row) {
var r = [];
r.push(row.preset)
var preset = getPreset(row.preset)
@ -513,8 +515,11 @@ function exportSequenceCSV() {
}
r.push(row.speed)
r.push(row.sleep)
r.push(preset.position.elevation)
r.push(preset.position.azimuth)
r.push(preset.position.absoluteZoom)
return r.join(',');
}).join('\n');
})).join('\n');
}
$('button.export_sequence_csv').on({click: function() {