Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Support interpolation for size, minSize, maxSize attributes #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/ui-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,19 @@ angular.module('ui.layout', [])
var animationClass = ctrl.isUsingColumnFlow ? 'animate-column' : 'animate-row';
element.addClass(animationClass);

scope.$watch('size', function(size) {
scope.container.uncollapsedSize = size;
ctrl.calculate();
});
scope.$watch('minSize', function(minSize) {
scope.container.minSize = minSize;
ctrl.calculate();
});
scope.$watch('maxSize', function(maxSize) {
scope.container.maxSize = maxSize;
ctrl.calculate();
});

scope.$watch('collapsed', function (val, old) {
if (angular.isDefined(old) && val !== old) {
ctrl.toggleContainer(scope.container.index);
Expand Down