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
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE

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 ) {