@nanoporetech-digital/components 5.5.3 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/nano-slides.cjs.entry.js +14 -2
- package/dist/cjs/nano-slides.cjs.entry.js.map +1 -1
- package/dist/cjs/{nano-table-382f010e.js → nano-table-e0a0c40f.js} +2 -2
- package/dist/cjs/{nano-table-382f010e.js.map → nano-table-e0a0c40f.js.map} +1 -1
- package/dist/cjs/nano-table.cjs.entry.js +1 -1
- package/dist/cjs/{table.worker-b62ccd2d.js → table.worker-249333f1.js} +2 -2
- package/dist/cjs/table.worker-249333f1.js.map +1 -0
- package/dist/collection/components/slides/slides-interface.js.map +1 -1
- package/dist/collection/components/slides/slides.js +16 -4
- package/dist/collection/components/slides/slides.js.map +1 -1
- package/dist/components/nano-slides.js +14 -2
- package/dist/components/nano-slides.js.map +1 -1
- package/dist/esm/nano-slides.entry.js +14 -2
- package/dist/esm/nano-slides.entry.js.map +1 -1
- package/dist/esm/{nano-table-b1bc144b.js → nano-table-d769b1dd.js} +2 -2
- package/dist/esm/{nano-table-b1bc144b.js.map → nano-table-d769b1dd.js.map} +1 -1
- package/dist/esm/nano-table.entry.js +1 -1
- package/dist/esm/{table.worker-3df85088.js → table.worker-cb6af8ab.js} +2 -2
- package/dist/esm/table.worker-cb6af8ab.js.map +1 -0
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/{p-043e539a.js → p-3018d4df.js} +2 -2
- package/dist/nano-components/{p-4e9125ec.entry.js → p-6106c383.entry.js} +3 -3
- package/dist/nano-components/p-6106c383.entry.js.map +1 -0
- package/dist/nano-components/{p-2a12fde7.entry.js → p-6ae6d4a6.entry.js} +2 -2
- package/dist/nano-components/{p-4c183b4b.js → p-94b4479b.js} +2 -2
- package/dist/types/components/slides/slides-interface.d.ts +1 -1
- package/dist/types/components/slides/slides.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/docs-json.json +6 -3
- package/docs-vscode.json +1 -1
- package/hydrate/index.js +14 -2
- package/package.json +2 -2
- package/dist/cjs/table.worker-b62ccd2d.js.map +0 -1
- package/dist/esm/table.worker-3df85088.js.map +0 -1
- package/dist/nano-components/p-4e9125ec.entry.js.map +0 -1
- /package/dist/nano-components/{p-043e539a.js.map → p-3018d4df.js.map} +0 -0
- /package/dist/nano-components/{p-2a12fde7.entry.js.map → p-6ae6d4a6.entry.js.map} +0 -0
- /package/dist/nano-components/{p-4c183b4b.js.map → p-94b4479b.js.map} +0 -0
@@ -3871,8 +3871,8 @@ const Slides = class {
|
|
3871
3871
|
this.parallax = async () => {
|
3872
3872
|
const flkty = await this.flickity;
|
3873
3873
|
const cells = flkty.cells;
|
3874
|
-
cells.forEach((cell
|
3875
|
-
const ele =
|
3874
|
+
cells.forEach((cell) => {
|
3875
|
+
const ele = cell.element.children[0];
|
3876
3876
|
let flkX = flkty.x;
|
3877
3877
|
if (flkty.options.wrapAround && flkty.cells.length > 1) {
|
3878
3878
|
flkX = modulo(flkX, flkty.slideableWidth);
|
@@ -3886,6 +3886,8 @@ const Slides = class {
|
|
3886
3886
|
x = ((cell.target + (flkX + flkty.slideableWidth)) * -1) / 3;
|
3887
3887
|
}
|
3888
3888
|
ele.style.transform = 'translate3d(' + x + 'px, 0, 0)';
|
3889
|
+
const animAmount = ((x * 3) / cell.size.width) * 100;
|
3890
|
+
cell.element.style.setProperty('--animation-amount', animAmount.toString());
|
3889
3891
|
});
|
3890
3892
|
};
|
3891
3893
|
this.handleFullscreen = (isFullScreen) => {
|
@@ -3953,6 +3955,16 @@ const Slides = class {
|
|
3953
3955
|
});
|
3954
3956
|
this.update();
|
3955
3957
|
}
|
3958
|
+
// was a custom animation
|
3959
|
+
if (typeof oldAnim === 'function') {
|
3960
|
+
flkty.off('scroll', oldAnim);
|
3961
|
+
}
|
3962
|
+
// is a custom animation
|
3963
|
+
if (typeof this.animation === 'function') {
|
3964
|
+
this.options = { fade: false, percentPosition: true };
|
3965
|
+
flkty.on('scroll', this.animation);
|
3966
|
+
return;
|
3967
|
+
}
|
3956
3968
|
// setup new stuff
|
3957
3969
|
switch (this.animation) {
|
3958
3970
|
case 'fade':
|