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

@ -10889,7 +10889,10 @@ requires
that.removeItems = function(ids) { that.removeItems = function(ids) {
self.$annotations.removeItems(ids); self.$annotations.removeItems(ids);
} }
that.deselectItems = function() {
if(self.$annotations.options('selected'))
self.$annotations.options('selected',[]);
}
return that; return that;
}; };
@ -11976,7 +11979,14 @@ requires
data.layer = layer.id; data.layer = layer.id;
that.triggerEvent('removeAnnotations', data); 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 submit: updateAnnotation
}); });
self.$annotationPanel[i] self.$annotationPanel[i]