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) {
span = result.data.items[0];
annotation = span.id.split('/')[1];
type == 'annotation' && pandora.UI.set('videoPoints.' + state.item, {
annotation: annotation,
// This is an optimization to make sure the video view
// immediately loads at the correct position
if (type == 'annotation') {
pandora.user.ui.videoPoints[state.item] = {
'in': span['in'],
out: span.out,
position: span['in']
});
};
}
}
callback(
!span ? ''