scroll to selected annotation on load

This commit is contained in:
rlx 2012-01-17 17:54:21 +05:30
parent 6d63c07ec5
commit 41e191f217
2 changed files with 4 additions and 1 deletions

View file

@ -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) {

View file

@ -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) {