fix #2559 (extra history entry added when resolving annotation id breaks back button)

This commit is contained in:
rolux 2014-11-15 14:13:42 +00:00
parent 1b9df27136
commit 1e3fa3c98e

View file

@ -1686,12 +1686,15 @@ pandora.getSpan = function(state, val, callback) {
if (result.data.items.length) { if (result.data.items.length) {
span = result.data.items[0]; span = result.data.items[0];
annotation = span.id.split('/')[1]; annotation = span.id.split('/')[1];
type == 'annotation' && pandora.UI.set('videoPoints.' + state.item, { // This is an optimization to make sure the video view
annotation: annotation, // immediately loads at the correct position
'in': span['in'], if (type == 'annotation') {
out: span.out, pandora.user.ui.videoPoints[state.item] = {
position: span['in'] 'in': span['in'],
}); out: span.out,
position: span['in']
};
}
} }
callback( callback(
!span ? '' !span ? ''