diff --git a/static/js/editPanel.js b/static/js/editPanel.js index 54a117a9..a3addaed 100644 --- a/static/js/editPanel.js +++ b/static/js/editPanel.js @@ -392,9 +392,14 @@ pandora.ui.editPanel = function() { items: Ox.flatten(clips.map(function(clip) { return clip.layers[layer.id].map(function(annotation) { var a = Ox.clone(annotation); - ['in', 'out'].forEach(function(point) { - a[point] = a[point] - clip['in'] + clip['position']; - }); + a['in'] = Math.max( + clip['position'], + a['in'] - clip['in'] + clip['position'] + ); + a.out = Math.min( + clip['position'] + clip['duration'], + a.out - clip['in'] + clip['position'] + ); return a; }); })),