From 1e8f5488570efae8320676b763db96608e0e0ae2 Mon Sep 17 00:00:00 2001 From: srv07 Date: Mon, 12 Dec 2016 16:49:58 +0530 Subject: [PATCH] Event broadcast in case of unplaceable item. --- src/angular-gridster.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/angular-gridster.js b/src/angular-gridster.js index 5fa8499f..be412c54 100755 --- a/src/angular-gridster.js +++ b/src/angular-gridster.js @@ -55,8 +55,8 @@ } }) - .controller('GridsterCtrl', ['gridsterConfig', '$timeout', - function(gridsterConfig, $timeout) { + .controller('GridsterCtrl', ['gridsterConfig', '$timeout', '$rootScope', + function(gridsterConfig, $timeout, $rootScope) { var gridster = this; @@ -172,6 +172,7 @@ } } throw new Error('Unable to place item!'); + $rootScope.$broadcast('gridster-item-unplaceable', item); }; /**