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

@vaadin-component-factory/vcf-anchor-nav

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin-component-factory/vcf-anchor-nav - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

package.json
{
"name": "@vaadin-component-factory/vcf-anchor-nav",
"version": "0.1.5",
"version": "0.1.6",
"description": "Component with tabs used as anchor navigation and content sections. Automates the linking of tabs and sections.",

@@ -5,0 +5,0 @@ "main": "theme/lumo/vcf-anchor-nav.js",

@@ -84,3 +84,3 @@ /**

static get version() {
return '0.1.5';
return '0.1.6';
}

@@ -147,7 +147,10 @@

this._initTabHighlight();
// Scroll to URL hash if possible
if (location.hash) {
const section = this.querySelector(location.hash);
if (section) this.scrollTo({ top: section.offsetTop - this.$.tabs.clientHeight });
}
// Hack to fix initial scroll on Firefox
setTimeout(() => {
// Scroll to URL hash if possible
if (location.hash) {
const section = this.querySelector(location.hash);
if (section) this.scrollTo({ top: section.offsetTop - this.$.tabs.clientHeight });
}
});
}

@@ -164,6 +167,10 @@ }

this.sections.forEach(element => {
// This factor value can be adjusted however
// Below 0.7 in Firefox the highlighting is inconsistent
// Above 0.9 all browsers may not work correctly
const factor = 0.75;
const height = this.clientHeight - this.$.tabs.clientHeight;
const options = {
root: this,
threshold: element.clientHeight > height ? (height / element.clientHeight) * 0.6 : 1
threshold: element.clientHeight > height ? (height / element.clientHeight) * factor : 1
};

@@ -170,0 +177,0 @@ const observer = new IntersectionObserver(callback, options);

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