Update limit-panels directive to query for the new Panels component

This commit is contained in:
Marliana Lara
2018-06-06 11:57:40 -04:00
parent 431ee9bbbf
commit decfc8fa8c

View File

@@ -10,9 +10,10 @@ export default [function() {
const maxPanels = parseInt(scope.maxPanels);
scope.$watch(
() => angular.element('#' + scope.panelContainer).find('.Panel').length,
() => angular.element('#' + scope.panelContainer).find('.Panel, .at-Panel').length,
() => {
const panels = angular.element('#' + scope.panelContainer).find('.Panel');
const panels = angular.element('#' + scope.panelContainer).find('.Panel, .at-Panel');
if(panels.length > maxPanels) {
// hide the excess panels
$(panels).each(function( index ) {