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

ay-accordion

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ay-accordion - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

33

dist/accordion.js

@@ -155,2 +155,8 @@ /*! Copyright (c) 2016 Ayogo Health Inc.

self.root.style.minHeight = null;
var scrollingRoot = document['scrollingElement'] || document.body;
var pageBottom = scrollingRoot.scrollTop + scrollingRoot.clientHeight;
var lastChild = measurements.pop();
if (lastChild.initialDimensions.height !== lastChild.newDimensions.height && (pageBottom - lastChild.initialDimensions.bottom < lastChild.initialDimensions.height)) {
window.scrollBy(0, (lastChild.newDimensions.height - lastChild.initialDimensions.height));
}
/* Invoke our callback function when done */

@@ -180,5 +186,5 @@ $scope.$applyAsync(function () {

$element[0].setAttribute('open', '');
if ($element[0] === $element[0].parentNode.lastElementChild) {
$element[0].scrollIntoView();
}
Array.prototype.forEach.call($element.children(), function (el) {
el.removeAttribute('hidden');
});
self.isOpen = true;

@@ -208,13 +214,2 @@ $scope.$applyAsync();

}
Array.prototype.forEach.call($element.children(), function (el) {
if (el.hasAttribute('ay-accordion-header') || el.querySelector('[ay-accordion-header]')) {
return;
}
if (self.isOpen) {
el.removeAttribute('hidden');
}
else {
el.setAttribute('hidden', '');
}
});
};

@@ -225,3 +220,11 @@ self.toggle = function (cb) {

}
self.rootCtrl.run(self.fn, cb);
self.rootCtrl.run(self.fn, function () {
Array.prototype.forEach.call($element.children(), function (el) {
if (self.isOpen || el.hasAttribute('ay-accordion-header') || el.querySelector('[ay-accordion-header]')) {
return;
}
el.setAttribute('hidden', '');
});
cb();
});
};

@@ -228,0 +231,0 @@ }],

{
"name": "ay-accordion",
"version": "1.2.1",
"version": "1.2.2",
"copyright": "Copyright 2016 Ayogo Health Inc.",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

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