Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-stackables

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-stackables - npm Package Compare versions

Comparing version 0.0.27 to 0.0.28

4

bower.json
{
"name": "angular-stackables",
"version": "0.0.27",
"version": "0.0.28",
"description": "AngularJS stackable widgets built on HTML5 dialog.",

@@ -11,3 +11,3 @@ "authors": [

"dependencies": {
"angular": "1.3.0-rc.0",
"angular": "1.3.0-rc.4",
"dialog-polyfill": "0.2.0"

@@ -14,0 +14,0 @@ },

{
"name": "angular-stackables",
"version": "0.0.27",
"version": "0.0.28",
"dependencies": {}
}

@@ -35,3 +35,2 @@ /*!

self.link = function(scope, element) {
self.scope = scope;
scope.stackable = self;

@@ -142,20 +141,20 @@

});
};
// close the stackable unless 'closing' callback aborts
self.close = function(err, result) {
var closing = self.scope.closing || angular.noop;
var shouldClose = closing.call(self.scope.$parent, {
err: err,
result: result
});
Promise.resolve(shouldClose).then(function() {
if(shouldClose !== false) {
self.error = err;
self.result = result;
self.scope.show = false;
self.scope.$apply();
}
});
};
// close the stackable unless 'closing' callback aborts
self.close = function(err, result) {
var closing = scope.closing || angular.noop;
var shouldClose = closing.call(scope.$parent, {
err: err,
result: result
});
Promise.resolve(shouldClose).then(function() {
if(shouldClose !== false) {
self.error = err;
self.result = result;
scope.show = false;
scope.$apply();
}
});
};
}
}

@@ -264,4 +263,19 @@ }

// watch state to reposition popover
scope.$watch('state', watchState, true);
// keep scope.state.show in-sync with show
scope.$watch('show', function(value) {
if(value !== undefined && scope.state) {
scope.state.show = value;
}
});
// clean up any remaining handlers
scope.$on('$destroy', function() {
doc.off('keyup', closeOnEscape).off('click', closeOnClick);
});
var doc = angular.element(document);
scope.$watch('state', function(state) {
function watchState(state) {
if(state) {

@@ -281,24 +295,5 @@ scope.show = state.show;

// schedule repositioning
setTimeout(function() {
// only reposition if content is shown
var content = element.find('.stackable-popover-content');
if(!content.length) {
return;
}
reposition(content);
});
}, true);
setTimeout(repositionIfShown);
}
// keep scope.state.show in-sync with show
scope.$watch('show', function(value) {
if(value !== undefined && scope.state) {
scope.state.show = value;
}
});
// clean up any remaining handlers
scope.$on('$destroy', function() {
doc.off('keyup', closeOnEscape).off('click', closeOnClick);
});
function closeOnClick(e) {

@@ -324,2 +319,11 @@ // close if target is not in the popover and trigger was not clicked

function repositionIfShown() {
// only reposition if content is shown
var content = element.find('.stackable-popover-content');
if(!content.length) {
return;
}
reposition(content);
}
function reposition(content) {

@@ -326,0 +330,0 @@ var width = content.outerWidth(false);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc