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

@dotdev/limelight

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotdev/limelight - npm Package Compare versions

Comparing version 2.1.21 to 2.1.22

9

CHANGELOG.md

@@ -0,1 +1,10 @@

## [2.1.22](https://github.com/ButsAndCats/limelight/compare/v2.1.21...v2.1.22) (2018-10-12)
### :zap:
* Massively improve sliding :expressionless: ([14b248d](https://github.com/ButsAndCats/limelight/commit/14b248d))
## [2.1.17](https://github.com/ButsAndCats/limelight/compare/2.1.16...2.1.17) (2018-08-27)

@@ -2,0 +11,0 @@

55

lib/limelight.js

@@ -292,57 +292,10 @@ "use strict";

Limelight.prototype.slideDown = function slideDown() {
var _this = this;
clearInterval(this.upInterval);
var el = this.slideElement; // Display none
var defaultDisplay = this.slideElement.style.display;
el.style.display = 'block';
el.style.overflow = 'visible';
el.style.maxHeight = '100%'; // Declare the value of "height" variable
this.maxHeight = el.offsetHeight;
el.style.display = defaultDisplay;
this.height = el.offsetHeight; // Declare the value of "counter" variable
this.counter = this.height;
el.style.maxHeight = "".concat(this.height, "px");
el.style.overflow = 'hidden';
el.style.display = 'block';
var adder = this.settings.slideSpeed; // Iteratively increase the height
this.downInterval = setInterval(function () {
_this.counter += adder;
if (_this.counter < _this.maxHeight) {
el.style.maxHeight = "".concat(_this.counter, "px");
} else {
el.style.maxHeight = null;
el.style.overflow = null;
_this.height = _this.slideElement.offsetHeight;
clearInterval(_this.downInterval);
}
}, 1);
var el = this.slideElement;
var height = "".concat(el.scrollHeight, "px");
el.style.height = height;
};
Limelight.prototype.slideUp = function slideUp() {
var _this2 = this;
clearInterval(this.downInterval);
var el = this.slideElement;
var subtractor = this.settings.slideSpeed; // To hide the content of the element
el.style.overflow = 'hidden'; // Decreasing the height
this.upInterval = setInterval(function () {
_this2.counter -= subtractor;
if (_this2.counter > 0) {
el.style.maxHeight = "".concat(_this2.counter, "px");
} else {
el.style.maxHeight = null;
el.style.display = 'none';
el.style.overflow = null;
clearInterval(_this2.upInterval);
}
}, 1);
el.style.height = null;
};

@@ -349,0 +302,0 @@

/* ===================================================================================== @preserve =
Limelight
version v2.1.17
version v2.1.18
Author: George Butter

@@ -96,3 +96,3 @@ https://github.com/ButsAndCats/limelight

Limelight.elements[target] = this
window.Limelight = Limelight || {};
window.Limelight = Limelight || {}
window.Limelight.elements[target] = this

@@ -166,3 +166,2 @@ this.buildEventListeners()

this.eventHandler(event, target)
}.bind(this)

@@ -261,55 +260,10 @@ const hoverFunction = function (event) {

Limelight.prototype.slideDown = function slideDown () {
clearInterval(this.upInterval)
const el = this.slideElement
// Display none
const defaultDisplay = this.slideElement.style.display
el.style.display = 'block'
el.style.overflow = 'visible'
el.style.maxHeight = '100%'
// Declare the value of "height" variable
this.maxHeight = el.offsetHeight
el.style.display = defaultDisplay
this.height = el.offsetHeight
// Declare the value of "counter" variable
this.counter = this.height
el.style.maxHeight = `${this.height}px`
el.style.overflow = 'hidden'
el.style.display = 'block'
const adder = this.settings.slideSpeed
// Iteratively increase the height
this.downInterval = setInterval(() => {
this.counter += adder
if (this.counter < this.maxHeight) {
el.style.maxHeight = `${this.counter}px`
} else {
el.style.maxHeight = null
el.style.overflow = null
this.height = this.slideElement.offsetHeight
clearInterval(this.downInterval)
}
}, 1)
const height = `${el.scrollHeight}px`
el.style.height = height
}
Limelight.prototype.slideUp = function slideUp () {
clearInterval(this.downInterval)
const el = this.slideElement
const subtractor = this.settings.slideSpeed
// To hide the content of the element
el.style.overflow = 'hidden'
// Decreasing the height
this.upInterval = setInterval(() => {
this.counter -= subtractor
if (this.counter > 0) {
el.style.maxHeight = `${this.counter}px`
} else {
el.style.maxHeight = null
el.style.display = 'none'
el.style.overflow = null
clearInterval(this.upInterval)
}
}, 1)
el.style.height = null
}

@@ -316,0 +270,0 @@

@@ -13,2 +13,3 @@ {

"@babel/preset-env": "^7.1.0",
"babel-core": "^6.26.3",
"babel-loader": "^8.0.4",

@@ -56,3 +57,3 @@ "babel-preset-env": "^1.7.0",

},
"version": "2.1.21"
"version": "2.1.22"
}
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