deselect items in other annotation layers

This commit is contained in:
j 2011-02-22 14:08:47 +01:00
parent 221355f8ba
commit 2f457f6ad0

View file

@ -10866,7 +10866,7 @@ requires
that.triggerEvent('select', {
'in': item['in'],
'out': item.out,
'layer': self.options.id
'layer': self.options.id
});
}
function updateAnnotation(event, data) {
@ -10889,7 +10889,10 @@ requires
that.removeItems = function(ids) {
self.$annotations.removeItems(ids);
}
that.deselectItems = function() {
if(self.$annotations.options('selected'))
self.$annotations.options('selected',[]);
}
return that;
};
@ -11976,7 +11979,14 @@ requires
data.layer = layer.id;
that.triggerEvent('removeAnnotations', data);
},
select: selectAnnotation,
select: function(event, data) {
self.options.layers.forEach(function(l, j) {
if(l.id != layer.id) {
self.$annotationPanel[j].deselectItems();
}
});
selectAnnotation(event, data);
},
submit: updateAnnotation
});
self.$annotationPanel[i]