Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding/Removing SplitAreas in DOM doesn't dynamically reset the Split. #4

Open
daric81 opened this issue Nov 8, 2017 · 2 comments
Open

Comments

@daric81
Copy link

daric81 commented Nov 8, 2017

Hi,
Been looking at using this library after giving up on angular-ui-layout.

I've noticed this issue and believe its down to line 39;
$scope.$watch($scope.areas, function () {...

This needs to be;
$scope.$watchCollection('areas', function () {....

this watch will fire when child items are added or removed from the DOM.

@scahitdemir
Copy link
Owner

Thank you for your interest. Actually, I haven't thought of such a behavior. I will take care of it.

@daric81
Copy link
Author

daric81 commented Nov 10, 2017

@scahitdemir Another change i made was to remove all 'gutter' elements from the DOM inside the $watchCollection handler. Works well now for a dynamic number of areas.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants