@vaadin-component-factory/vcf-anchor-nav
Advanced tools
Comparing version 1.0.10 to 1.0.13
{ | ||
"name": "@vaadin-component-factory/vcf-anchor-nav", | ||
"version": "1.0.10", | ||
"version": "1.0.13", | ||
"description": "Component with tabs used as anchor navigation and content sections. Automates the linking of tabs and sections.", | ||
@@ -67,2 +67,3 @@ "main": "theme/lumo/vcf-anchor-nav.js", | ||
"@rollup/plugin-node-resolve": "^7.1.3", | ||
"@vaadin-component-factory/vcf-element-util": "^0.1.4", | ||
"@vaadin/vaadin-button": "^2.3.0", | ||
@@ -69,0 +70,0 @@ "@vaadin/vaadin-text-field": "2.5.5", |
@@ -145,3 +145,3 @@ /** | ||
static get version() { | ||
return '1.0.10'; | ||
return '1.0.13'; | ||
} | ||
@@ -278,5 +278,9 @@ | ||
_initContainerResizeObserver() { | ||
let firstResize = true; | ||
const observer = new ResizeObserver(() => { | ||
this._initTabHighlight(); | ||
if (this.selectedId) this.scrollTo({ top: this.querySelector(`#${this.selectedId}`).offsetTop - this._tabHeight }); | ||
if (this.selectedId && firstResize) { | ||
this.scrollTo({ top: this.querySelector(`#${this.selectedId}`).offsetTop - this._tabHeight }); | ||
firstResize = false; | ||
} | ||
}); | ||
@@ -283,0 +287,0 @@ observer.observe(this.$.container); |
217647
2169
48