fix preset lookup
This commit is contained in:
parent
5b776ca0ee
commit
2b81162fbf
|
@ -376,7 +376,9 @@ function updateShiftStatus() {
|
|||
if (response.result) {
|
||||
if (response.result.status) {
|
||||
current_position = response.result.status;
|
||||
var preset = presets[parseInt($('select[name=preset-editor]').val(), 10)];
|
||||
var preset = presets.filter(function(p) {
|
||||
return p.id == parseInt($('select[name=preset-editor]').val(), 10)
|
||||
})[0];
|
||||
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'];
|
||||
|
|
Loading…
Reference in New Issue
Block a user