Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
style: some more formatting fixes to clean up diff
  • Loading branch information
widmoser committed Dec 9, 2015
commit 4bc969ee9635b58f00b3bc632f65947e12e5fa1a
10 changes: 5 additions & 5 deletions src/ui-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ angular.module('ui.layout', [])

//verify the container was found in the list
if(index > -1) {
var beforeContainer = (index > 0) ? ctrl.containers[index - 1] : null;
var afterContainer = ((index+1) <= ctrl.containers.length) ? ctrl.containers[index + 1] : null;
var beforeContainer = (index > 0) ? ctrl.containers[index-1] : null;
var afterContainer = ((index+1) <= ctrl.containers.length) ? ctrl.containers[index+1] : null;

if(beforeContainer !== null) setValues(beforeContainer);
if(afterContainer !== null) setValues(afterContainer);
Expand Down Expand Up @@ -283,7 +283,7 @@ angular.module('ui.layout', [])
ctrl.calculate = function() {
var c, i;
var dividerSize = parseInt(opts.dividerSize);
var elementSize = $element[0].getBoundingClientRect()[ctrl.sizeProperties.sizeProperty]; // width/height
var elementSize = $element[0].getBoundingClientRect()[ctrl.sizeProperties.sizeProperty];
var availableSize = elementSize - (dividerSize * numOfSplitbars);
var originalSize = availableSize;
var usedSpace = 0;
Expand Down Expand Up @@ -347,7 +347,7 @@ angular.module('ui.layout', [])
remainder = availableSize - autoSize * numOfAutoContainers;
for(i=0; i < ctrl.containers.length; i++) {
c = ctrl.containers[i];
c[ctrl.sizeProperties.flowProperty] = usedSpace; // left/top
c[ctrl.sizeProperties.flowProperty] = usedSpace;
c.maxSize = opts.maxSizes[i];
c.minSize = opts.minSizes[i];

Expand Down Expand Up @@ -954,7 +954,7 @@ angular.module('ui.layout', [])
element.addClass(animationClass);

scope.$watch('collapsed', function (val, old) {
if(angular.isDefined(old) && val !== old) {
if (angular.isDefined(old) && val !== old) {
ctrl.toggleContainer(scope.container.index);
}
});
Expand Down
6 changes: 3 additions & 3 deletions test/layout-scenar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function splitMoveTests(description, startEvent, moveEvent, endEvent) {
}
});

afterEach(function() {
afterEach(function () {
if(element) element.remove();
});

Expand All @@ -59,13 +59,13 @@ function splitMoveTests(description, startEvent, moveEvent, endEvent) {

// Spy on the requestAnimationFrame to directly trigger it
beforeEach(function () {
spyOn(window, 'requestAnimationFrame').and.callFake(function(fct) {
spyOn(window, 'requestAnimationFrame').and.callFake(function (fct) {
fct();
});
});

afterEach(function () {
if(element) element.remove();
if (element) element.remove();
});

describe('the slider', function () {
Expand Down