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

Commit 1742f9f

Browse files
committed
Added 'dividerSize' property to adjust the size of the divider without altering CSS
1 parent 2dce9d4 commit 1742f9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ui-layout.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ angular.module('ui.layout', [])
125125
opts.sizes = opts.sizes || [];
126126
opts.maxSizes = opts.maxSizes || [];
127127
opts.minSizes = opts.minSizes || [];
128+
opts.dividerSize = opts.dividerSize || '10px';
128129

129130
// Preallocate the array size
130131
opts.sizes.length = _child_len;
@@ -148,6 +149,7 @@ angular.module('ui.layout', [])
148149
// Initialise the layout with equal sizes.
149150
var flowProperty = ( isUsingColumnFlow ? 'left' : 'top');
150151
var oppositeFlowProperty = ( isUsingColumnFlow ? 'right' : 'bottom');
152+
var sizeProperty = ( isUsingColumnFlow ? 'width' : 'height');
151153
_position = 0;
152154
for (_i = 0; _i < _child_len; ++_i) {
153155
var area = angular.element(_childens[_i])
@@ -159,6 +161,7 @@ angular.module('ui.layout', [])
159161
if (_i < _child_len - 1) {
160162
// Add a split bar
161163
var bar = angular.element(splitBarElem_htmlTemplate).css(flowProperty, _position + '%');
164+
bar.css(sizeProperty, opts.dividerSize);
162165
area.after(bar);
163166
}
164167
}

0 commit comments

Comments
 (0)