deselect items in other annotation layers
This commit is contained in:
parent
221355f8ba
commit
2f457f6ad0
1 changed files with 13 additions and 3 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue