From 41e191f217ab809918b36706938c06b4c892b743 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 17 Jan 2012 17:54:21 +0530 Subject: [PATCH] scroll to selected annotation on load --- source/Ox.UI/js/Video/Ox.AnnotationFolder.js | 1 - source/Ox.UI/js/Video/Ox.AnnotationPanel.js | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js index b9a34b7a..d33a6601 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js @@ -368,7 +368,6 @@ Ox.AnnotationFolder = function(options, self) { } function selectAnnotation(data) { - Ox.print('SELECT annotation', data) var item = Ox.getObjectById(self.options.items, data.id); self.options.selected = item ? data.id : ''; if (self.widget) { diff --git a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js index 0dce8c6a..3abf74ab 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js @@ -227,6 +227,10 @@ Ox.AnnotationPanel = function(options, self) { }) ); + self.options.selected && scrollToSelected( + getFolder(self.options.selected).options('type') + ); + function getFolder(annotationId) { var found = false, folder; Ox.forEach(self.options.layers, function(layer, i) {