@vaadin-component-factory/vcf-anchor-nav
Advanced tools
Comparing version 1.0.9 to 1.0.10
{ | ||
"name": "@vaadin-component-factory/vcf-anchor-nav", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"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", |
@@ -79,3 +79,3 @@ import { PolymerElement, html } from '@polymer/polymer/polymer-element.js'; | ||
</div> | ||
<div id="content" paer="content"> | ||
<div id="content" part="content"> | ||
<slot></slot> | ||
@@ -82,0 +82,0 @@ </div> |
@@ -145,3 +145,3 @@ /** | ||
static get version() { | ||
return '1.0.9'; | ||
return '1.0.10'; | ||
} | ||
@@ -218,3 +218,6 @@ | ||
this.$.slot.addEventListener('slotchange', () => this._onSlotChange()); | ||
window.addEventListener('popstate', () => this._scrollToHash()); | ||
window.addEventListener('popstate', () => { | ||
this._initTabHighlight(); | ||
this._scrollToHash(); | ||
}); | ||
this._verticalTabs = false; | ||
@@ -260,3 +263,4 @@ } | ||
_getAnchorHref() { | ||
return location.pathname[location.pathname.length - 1] === '/' ? location.pathname : location.pathname + '/'; | ||
const end = location.pathname.length - 1; | ||
return location.pathname[end] === '/' ? location.pathname : location.pathname + '/'; | ||
} | ||
@@ -263,0 +267,0 @@ |
217493
2165