Merge pull request #1639 from normanjaeckel/FixActiveElementLine
Fixed blue line for active projector elements.
This commit is contained in:
commit
9302b61918
@ -115,20 +115,20 @@ angular.module('OpenSlidesApp.core', [
|
|||||||
'/rest/core/projector/1/prune_elements/',
|
'/rest/core/projector/1/prune_elements/',
|
||||||
[{name: this.getResourceName(), id: this.id}]
|
[{name: this.getResourceName(), id: this.id}]
|
||||||
);
|
);
|
||||||
}
|
};
|
||||||
BaseModel.prototype.isProjected = function() {
|
BaseModel.prototype.isProjected = function() {
|
||||||
// Returns true if there is a projector element with the same
|
// Returns true if there is a projector element with the same
|
||||||
// name and the same id.
|
// name and the same id.
|
||||||
var projector = Projector.get(1);
|
var projector = Projector.get(1);
|
||||||
if (typeof projector === 'undefined') return false;
|
if (typeof projector === 'undefined') return false;
|
||||||
var self = this;
|
var self = this;
|
||||||
return _.findIndex(projector.elements, function(element) {
|
var predicate = function (element) {
|
||||||
return element.name == self.getResourceName() &&
|
return element.name == self.getResourceName() &&
|
||||||
typeof(element.context) !== 'undefined' &&
|
typeof element.id !== 'undefined' &&
|
||||||
typeof(element.context.id) !== 'undefined' &&
|
element.id == self.id;
|
||||||
element.context.id == self.id;
|
};
|
||||||
}) > -1;
|
return typeof _.findKey(projector.elements, predicate) === 'string';
|
||||||
}
|
};
|
||||||
return BaseModel;
|
return BaseModel;
|
||||||
}])
|
}])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user