angular-stackables
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "angular-stackables", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "AngularJS stackable widgets built on HTML5 dialog.", | ||
@@ -5,0 +5,0 @@ "authors": [ |
{ | ||
"name": "angular-stackables", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"dependencies": {} | ||
} |
@@ -61,3 +61,5 @@ angular-stackables | ||
<div ng-controller="TestController as test"> | ||
<a class="btn" stackable-trigger="test.popoverState"> | ||
<a class="btn" | ||
stackable-trigger="test.popoverState" | ||
stackable-toggle="'active'"> | ||
<i class="caret"></i> | ||
@@ -64,0 +66,0 @@ </a> |
@@ -290,2 +290,3 @@ /*! | ||
var state; | ||
var toggleClasses = ''; | ||
initState(attrs.stackableTrigger); | ||
@@ -295,2 +296,5 @@ attrs.$observe('stackableTrigger', function(value) { | ||
}); | ||
attrs.$observe('stackableToggle', function(value) { | ||
toggleClasses = $parse(value)(scope); | ||
}); | ||
@@ -303,2 +307,15 @@ // update element position when window resized | ||
// add/remove toggle classes when state.show changes | ||
scope.$watch(function() { | ||
return state.show; | ||
}, function(value) { | ||
if(toggleClasses) { | ||
if(value === true) { | ||
element.addClass(toggleClasses); | ||
} else { | ||
element.removeClass(toggleClasses); | ||
} | ||
} | ||
}); | ||
var toggleEvent = attrs.stackableToggle || 'click'; | ||
@@ -305,0 +322,0 @@ if(toggleEvent === 'hover') { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22826
648
100