New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hiding-header

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hiding-header - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

15

dist/index.es.js

@@ -41,4 +41,6 @@ function hidingHeader(container, _a) {

};
var capBoundsHeight = function (rawBoundsHeight) {
return Math.min(getParentHeight() - getRelativeTopOffset(), Math.max(getContentHeight(), rawBoundsHeight));
};
var onScroll = function () {
var parentHeight = getParentHeight();
var globalTopOffset = getGlobalTopOffset();

@@ -55,4 +57,3 @@ // Handle content height

if (!paused) {
var maxBoundsHeight = parentHeight - getRelativeTopOffset();
var boundsHeight = Math.min(maxBoundsHeight, Math.max(contentHeight, (function () {
var boundsHeight = capBoundsHeight((function () {
if (isScrollingDown) {

@@ -72,3 +73,3 @@ var newBoundsHeight = scrollTopPosition - globalTopOffset;

}
})()));
})());
updateBoundsHeight(boundsHeight);

@@ -97,5 +98,4 @@ }

var contentHeight = getContentHeight();
var maxBoundsHeight = getParentHeight() - getRelativeTopOffset();
var globalTopOffset = getGlobalTopOffset();
var boundsHeight = Math.min(maxBoundsHeight, scrollTopPosition - globalTopOffset + contentHeight);
var boundsHeight = capBoundsHeight(scrollTopPosition - globalTopOffset + contentHeight);
animateOffset(lastBoundsHeight - boundsHeight);

@@ -106,5 +106,4 @@ updateBoundsHeight(boundsHeight);

var scrollTopPosition = window.scrollY;
var contentHeight = getContentHeight();
var globalTopOffset = getGlobalTopOffset();
var boundsHeight = Math.max(contentHeight, scrollTopPosition - globalTopOffset);
var boundsHeight = capBoundsHeight(scrollTopPosition - globalTopOffset);
animateOffset(lastBoundsHeight - boundsHeight);

@@ -111,0 +110,0 @@ updateBoundsHeight(boundsHeight);

@@ -45,4 +45,6 @@ 'use strict';

};
var capBoundsHeight = function (rawBoundsHeight) {
return Math.min(getParentHeight() - getRelativeTopOffset(), Math.max(getContentHeight(), rawBoundsHeight));
};
var onScroll = function () {
var parentHeight = getParentHeight();
var globalTopOffset = getGlobalTopOffset();

@@ -59,4 +61,3 @@ // Handle content height

if (!paused) {
var maxBoundsHeight = parentHeight - getRelativeTopOffset();
var boundsHeight = Math.min(maxBoundsHeight, Math.max(contentHeight, (function () {
var boundsHeight = capBoundsHeight((function () {
if (isScrollingDown) {

@@ -76,3 +77,3 @@ var newBoundsHeight = scrollTopPosition - globalTopOffset;

}
})()));
})());
updateBoundsHeight(boundsHeight);

@@ -101,5 +102,4 @@ }

var contentHeight = getContentHeight();
var maxBoundsHeight = getParentHeight() - getRelativeTopOffset();
var globalTopOffset = getGlobalTopOffset();
var boundsHeight = Math.min(maxBoundsHeight, scrollTopPosition - globalTopOffset + contentHeight);
var boundsHeight = capBoundsHeight(scrollTopPosition - globalTopOffset + contentHeight);
animateOffset(lastBoundsHeight - boundsHeight);

@@ -110,5 +110,4 @@ updateBoundsHeight(boundsHeight);

var scrollTopPosition = window.scrollY;
var contentHeight = getContentHeight();
var globalTopOffset = getGlobalTopOffset();
var boundsHeight = Math.max(contentHeight, scrollTopPosition - globalTopOffset);
var boundsHeight = capBoundsHeight(scrollTopPosition - globalTopOffset);
animateOffset(lastBoundsHeight - boundsHeight);

@@ -115,0 +114,0 @@ updateBoundsHeight(boundsHeight);

{
"name": "hiding-header",
"version": "0.3.0",
"version": "0.3.1",
"description": "Toggles header visibility on scroll.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

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