Merge pull request #2629 from CatoTH/Issue2617-switch-back-to-original-view

Switch back to original view after deleting last change recommendation (Closes #2617)
This commit is contained in:
Norman Jäckel 2016-11-15 23:14:03 +01:00 committed by GitHub
commit 35e54eecbd

View File

@ -461,6 +461,13 @@ angular.module('OpenSlidesApp.motions.motionservices', ['OpenSlidesApp.motions',
$scope.$watch(function() {
return $('.change-recommendation-list').children().length;
}, obj.repositionOriginalAnnotations);
$scope.$watch(function () {
return $scope.change_recommendations.length;
}, function () {
if ($scope.change_recommendations.length === 0) {
obj.mode = 'original';
}
});
var sizeCheckerLastSize = null,
sizeCheckerLastClass = null,