Compare commits
No commits in common. "b42b14eed8f04587ca3ffe54f973fdb27e73a51e" and "5b776ca0ee57f10ece45e222e8dd295cfc2c2fb8" have entirely different histories.
b42b14eed8
...
5b776ca0ee
|
@ -100,7 +100,6 @@
|
|||
<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>
|
||||
<h2>Import:</h2>
|
||||
<li><input class="import_sequence" type="file">import sequence</input></li>
|
||||
|
|
|
@ -376,9 +376,7 @@ function updateShiftStatus() {
|
|||
if (response.result) {
|
||||
if (response.result.status) {
|
||||
current_position = response.result.status;
|
||||
var preset = presets.filter(function(p) {
|
||||
return p.id == parseInt($('select[name=preset-editor]').val(), 10)
|
||||
})[0];
|
||||
var preset = presets[parseInt($('select[name=preset-editor]').val(), 10)];
|
||||
preset_offset['azimuth'] = preset['position']['azimuth'] - current_position['azimuth'];
|
||||
preset_offset['elevation'] = preset['position']['elevation'] - current_position['elevation'];
|
||||
preset_offset['absoluteZoom'] = preset['position']['absoluteZoom'] - current_position['absoluteZoom'];
|
||||
|
@ -489,47 +487,6 @@ function exportSequence() {
|
|||
})
|
||||
}
|
||||
|
||||
function getPreset(id) {
|
||||
return presets.filter(function(preset) {
|
||||
return preset.id == id;
|
||||
})[0]
|
||||
}
|
||||
|
||||
function exportSequenceCSV() {
|
||||
var position = 0;
|
||||
return data.map(function(row) {
|
||||
var r = [];
|
||||
r.push(row.preset)
|
||||
var preset = getPreset(row.preset)
|
||||
r.push(preset.name)
|
||||
if (row.duration) {
|
||||
position += row.duration
|
||||
r.push(formatDuration(position))
|
||||
r.push(formatDuration(row.duration))
|
||||
} else {
|
||||
r.push('')
|
||||
r.push('')
|
||||
}
|
||||
r.push(row.speed)
|
||||
r.push(row.sleep)
|
||||
return r.join(',');
|
||||
}).join('\n');
|
||||
}
|
||||
|
||||
$('button.export_sequence_csv').on({click: function() {
|
||||
data.forEach(function(seq) {
|
||||
if (!seq.seqid) {
|
||||
seq.seqid = uuidv4()
|
||||
}
|
||||
})
|
||||
var blob = textBlob(JSON.stringify(exportSequenceCSV(), null, ' '))
|
||||
var url = window.URL.createObjectURL(blob);
|
||||
$(this).parent().attr({
|
||||
href: url, download: 'sequence.csv'
|
||||
});
|
||||
}})
|
||||
|
||||
|
||||
$('button.export_sequence').on({click: function() {
|
||||
data.forEach(function(seq) {
|
||||
if (!seq.seqid) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user