angular-ui-layout
Advanced tools
+1
-1
| { | ||
| "name": "angular-ui-layout", | ||
| "version": "1.2.2", | ||
| "version": "1.2.3", | ||
| "description": "This directive allows you to split !", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
+9
-6
@@ -7,3 +7,3 @@ 'use strict'; | ||
| angular.module('ui.layout', []) | ||
| .controller('uiLayoutCtrl', ['$scope', '$attrs', '$element', '$timeout', 'LayoutContainer', function uiLayoutCtrl($scope, $attrs, $element, $timeout, LayoutContainer) { | ||
| .controller('uiLayoutCtrl', ['$scope', '$attrs', '$element', '$timeout', '$window', 'LayoutContainer', function uiLayoutCtrl($scope, $attrs, $element, $timeout, $window, LayoutContainer) { | ||
| var ctrl = this; | ||
@@ -145,3 +145,6 @@ var opts = angular.extend({}, $scope.$eval($attrs.uiLayout), $scope.$eval($attrs.options)); | ||
| (mouseEvent.originalEvent && mouseEvent.originalEvent[ctrl.sizeProperties.mouseProperty]) || | ||
| (mouseEvent.targetTouches ? mouseEvent.targetTouches[0][ctrl.sizeProperties.mouseProperty] : 0); | ||
| // jQuery does touches weird, see #82 | ||
| ($window.jQuery ? | ||
| (mouseEvent.originalEvent ? mouseEvent.originalEvent.targetTouches[0][ctrl.sizeProperties.mouseProperty] : 0) : | ||
| (mouseEvent.targetTouches ? mouseEvent.targetTouches[0][ctrl.sizeProperties.mouseProperty] : 0)); | ||
@@ -235,5 +238,5 @@ lastPos = mousePos - offset($element)[ctrl.sizeProperties.offsetPos]; | ||
| var child = ctrl.containers[i].element; | ||
| opts.maxSizes[i] = child.attr('max-size') || opts.maxSizes[i] || null; | ||
| opts.minSizes[i] = child.attr('min-size') || opts.minSizes[i] || null; | ||
| opts.sizes[i] = child.attr('size') || opts.sizes[i] || 'auto'; | ||
| opts.maxSizes[i] = child.attr('max-size') || child.attr('data-max-size') || opts.maxSizes[i] || null; | ||
| opts.minSizes[i] = child.attr('min-size') || child.attr('data-min-size') || opts.minSizes[i] || null; | ||
| opts.sizes[i] = child.attr('size') || child.attr('data-size') || opts.sizes[i] || 'auto'; | ||
| //opts.collapsed[i] = child.attr('collapsed') || opts.collapsed[i] || false; | ||
@@ -563,3 +566,3 @@ | ||
| function onResize() { | ||
| scope.$apply(function() { | ||
| scope.$evalAsync(function() { | ||
| ctrl.updateDisplay(); | ||
@@ -566,0 +569,0 @@ }); |
+53
-4
@@ -141,5 +141,23 @@ 'use strict'; | ||
| function createDataSizedDirective(notation) { | ||
| element = createDirective(null, '<div ui-layout><header ui-layout-container data-size="' + notation + '"></header><footer ui-layout-container></footer></div>'); | ||
| $header = element.children().eq(0)[0]; | ||
| $footer = element.children().eq(2)[0]; | ||
| return element; | ||
| } | ||
| function testSizeNotation(notation, actualSize) { | ||
| element = createSizedDirective(notation); | ||
| test(element, notation, actualSize); | ||
| element.remove(); | ||
| element = createDataSizedDirective(notation); | ||
| test(element, notation, actualSize); | ||
| element.remove(); | ||
| } | ||
| function test(element, notation, actualSize) { | ||
| layoutBounds = element[0].getBoundingClientRect(); | ||
@@ -160,3 +178,2 @@ headerBounds = $header.getBoundingClientRect(); | ||
| element.remove(); | ||
| } | ||
@@ -204,5 +221,23 @@ | ||
| function createDataSizedDirective(notation) { | ||
| element = createDirective(null, '<div ui-layout><header ui-layout-container size="1px" data-min-size="' + notation + '"></header><footer ui-layout-container></footer></div>'); | ||
| $header = element.children().eq(0)[0]; | ||
| $footer = element.children().eq(2)[0]; | ||
| return element; | ||
| } | ||
| function testSizeNotation(notation, minSize) { | ||
| element = createSizedDirective(notation); | ||
| test(element, notation, minSize); | ||
| element.remove(); | ||
| element = createDataSizedDirective(notation); | ||
| test(element, notation, minSize); | ||
| element.remove(); | ||
| } | ||
| function test(element, notation, minSize) { | ||
| layoutBounds = element[0].getBoundingClientRect(); | ||
@@ -222,4 +257,2 @@ headerBounds = $header.getBoundingClientRect(); | ||
| } | ||
| element.remove(); | ||
| } | ||
@@ -256,5 +289,22 @@ | ||
| function createDataSizedDirective(notation) { | ||
| element = createDirective(null, '<div ui-layout><header ui-layout-container size="100%" data-max-size="' + notation + '"></header><footer ui-layout-container></footer></div>'); | ||
| $header = element.children().eq(0)[0]; | ||
| $footer = element.children().eq(2)[0]; | ||
| return element; | ||
| } | ||
| function testSizeNotation(notation, maxSize) { | ||
| element = createSizedDirective(notation); | ||
| test(element, notation, maxSize); | ||
| element.remove(); | ||
| element = createDataSizedDirective(notation); | ||
| test(element, notation, maxSize); | ||
| element.remove(); | ||
| } | ||
| function test(element, notation, maxSize) { | ||
| layoutBounds = element[0].getBoundingClientRect(); | ||
@@ -275,3 +325,2 @@ headerBounds = $header.getBoundingClientRect(); | ||
| element.remove(); | ||
| } | ||
@@ -278,0 +327,0 @@ |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
99608
2.05%1807
2.21%