[Toolbar] set selection initially in fixed controller and toolbar... (#1994)

* [Toolbar] set selection initially in fixed controller and toolbar...

... to make the add button appear in the toolbar when a fixed position is created.

Remove selection change listener on destroy.

Start a digest cycle when handling selection in toolbar to avoid delays in toolbar.

Fixes #1991, #1987

* fixed checkstyle and lint errors

* Fix tests

* Update comment
This commit is contained in:
Pegah Sarram
2018-04-20 08:45:29 -07:00
committed by Pete Richards
parent 78a5ace18d
commit 75ae5ab3bb
6 changed files with 61 additions and 34 deletions

View File

@@ -36,7 +36,7 @@ define(
beforeEach(function () {
mockScope = jasmine.createSpyObj(
'$scope',
['$on', '$watch', '$watchCollection', "commit"]
['$on', '$watch', '$watchCollection', "commit", "$apply"]
);
mockElement = {};
testAttrs = { toolbar: 'testToolbar' };