-
Notifications
You must be signed in to change notification settings - Fork 106
fix: 2.0 pfe-jump-links doc updates and fixes #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
91338cb
11a7351
6e50ed5
5f3833e
c5fd74e
d68104c
9105d94
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,13 +38,16 @@ function isQueryable(x: Node): x is Document|ShadowRoot { | |
|
|
||
| /** | ||
| * @fires pfe-jump-links-panel:active-navItem | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we deprecate the el:name events and add our own
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea. Just updated them to our new |
||
| * Active navigation element has changed. | ||
| * @fires pfe-jump-links-nav:change | ||
| * Panel content has changed. | ||
| * @fires pfe-jump-links-nav:stuck | ||
| * When the nav panel stucks and unsticks from its container. | ||
| * | ||
| * @slot heading - The label displayed above the navigation element describing it's function. Defaults to "Jump to section". | ||
| * @slot - The component creates a mirror shadowRoot based on the light DOM markup provided in the default slot. | ||
| * @slot logo - | ||
| * @slot cta - | ||
| * @slot heading - The label displayed above the navigation element describing it's function. Defaults to "Jump to section". | ||
| * @slot logo - Optionally add a logo that can appear in the horizontal layout mode. | ||
| * @slot cta - Optionally add a call-to-action element at the bottom of the nav. | ||
| */ | ||
| @customElement('pfe-jump-links-nav') @pfelement() | ||
| export class PfeJumpLinksNav extends LitElement { | ||
|
|
@@ -333,7 +336,7 @@ export class PfeJumpLinksNav extends LitElement { | |
| // @TODO It seems like the offset is 0 when non-horizontal jumps links are mobile | ||
| get offsetValue(): number { | ||
| // If the offset attribute has been set, use that (no calculations) | ||
| if (this.offset) { | ||
| if (typeof this.offset !== 'undefined' && this.offset !== null) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could also be |
||
| return parseInt(this.offset.toString(), 10); | ||
| } | ||
|
|
||
|
|
@@ -470,7 +473,9 @@ export class PfeJumpLinksNav extends LitElement { | |
|
|
||
|
|
||
| window.addEventListener('resize', this._resizeHandler); | ||
| window.addEventListener('scroll', this._scrollHandler); | ||
| // set the `useCapture` to true for scroll events to capture | ||
| // scroll events in nested scrollable containers. | ||
| window.addEventListener('scroll', this._scrollHandler, true); | ||
| // window.addEventListener(events.keyup, this._keyboardHandler); | ||
|
|
||
| // If the stickiness changes, update the sticky navigation offset | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.