Skip to content

Commit

Permalink
Remove stickyfilljs dependency (vaadin-component-factory#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenz committed Sep 25, 2024
1 parent 5ae3823 commit 4f19d58
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/common-js-modules.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require('intersection-observer');
const stickyPolyfill = require('stickyfilljs');
const smoothScrollPolyfill = require('smoothscroll-polyfill').polyfill;

module.exports = { smoothScrollPolyfill, stickyPolyfill };
module.exports = { smoothScrollPolyfill };
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
"@vaadin/vaadin-lumo-styles": "^23.3.1",
"@vaadin/vaadin-themable-mixin": "^23.3.1",
"intersection-observer": "^0.10.0",
"smoothscroll-polyfill": "^0.4.4",
"stickyfilljs": "^2.1.0"
"smoothscroll-polyfill": "^0.4.4"
},
"devDependencies": {
"@babel/core": "^7.5.5",
Expand Down
5 changes: 2 additions & 3 deletions src/vcf-anchor-nav.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html, PolymerElement } from '@polymer/polymer/polymer-element';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin';
import { smoothScrollPolyfill, stickyPolyfill } from '../lib/common-js-modules.esm';
import { smoothScrollPolyfill } from '../lib/common-js-modules.esm';
import { ResizeObserver } from '@juggle/resize-observer';
import '@vaadin/tabs/vaadin-tabs';
import '@vaadin/tabs/vaadin-tab';
Expand Down Expand Up @@ -244,9 +244,8 @@ export class AnchorNavElement extends ElementMixin(ThemableMixin(PolymerElement)
ready() {
super.ready();
this._verticalTabs = false;
// Add polyfills
// Add polyfill
smoothScrollPolyfill();
stickyPolyfill.add(this.$.tabs);
// Init observers
this._initTabsStuckAttribute();
this._initWindowResizeListener();
Expand Down

0 comments on commit 4f19d58

Please sign in to comment.