place could be null
This commit is contained in:
parent
07d9b9c925
commit
6d59519c64
1 changed files with 3 additions and 2 deletions
|
@ -231,14 +231,15 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
// FIXME: duplicated!
|
// FIXME: duplicated!
|
||||||
select: function(data) {
|
select: function(data) {
|
||||||
if (
|
if (
|
||||||
!data.id && self.options.selected
|
(!data || !data.id) && self.options.selected
|
||||||
&& isDefined(Ox.getObjectById(self.options.items, self.options.selected))
|
&& isDefined(Ox.getObjectById(self.options.items, self.options.selected))
|
||||||
) {
|
) {
|
||||||
// only deselect annotation if the place deselect was not
|
// only deselect annotation if the place deselect was not
|
||||||
// caused by switching to an annotation without place
|
// caused by switching to an annotation without place
|
||||||
self.$annotations.options({selected: ''});
|
self.$annotations.options({selected: ''});
|
||||||
} else if (
|
} else if (
|
||||||
data.annotationIds
|
data
|
||||||
|
&& data.annotationIds
|
||||||
&& data.annotationIds.indexOf(self.options.selected) == -1
|
&& data.annotationIds.indexOf(self.options.selected) == -1
|
||||||
) {
|
) {
|
||||||
// only select a new annotation if the currently selected
|
// only select a new annotation if the currently selected
|
||||||
|
|
Loading…
Reference in a new issue