From 51446f2a8b898767eaeec83d1f88412aed031cbc Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 26 Oct 2023 12:37:23 +0300 Subject: [PATCH] Update doc for animate --- .../lib/animateonscroll/AnimateOnScroll.d.ts | 23 ++----------------- .../lib/animateonscroll/AnimateOnScroll.js | 2 +- doc/animateonscroll/BasicDoc.vue | 16 ------------- 3 files changed, 3 insertions(+), 38 deletions(-) diff --git a/components/lib/animateonscroll/AnimateOnScroll.d.ts b/components/lib/animateonscroll/AnimateOnScroll.d.ts index c49a20a47..24604896a 100644 --- a/components/lib/animateonscroll/AnimateOnScroll.d.ts +++ b/components/lib/animateonscroll/AnimateOnScroll.d.ts @@ -8,50 +8,31 @@ */ import { DirectiveBinding, ObjectDirective } from 'vue'; import { DirectiveHooks } from '../basedirective/BaseDirective'; -import { PassThroughOptions } from '../passthrough'; -import { PassThrough } from '../ts-helpers'; /** * Defines options of AnimateOnScroll. */ export interface AnimateOnScrollOptions { /** - * AnimateOnScroll scroll to add when item begins to get displayed. + * Style class to add when item goes into viewport, use white space as a delimeter to define multiple classes. */ enterClass?: string | undefined; /** - * AnimateOnScroll scroll to add when item begins to get hidden. + * Style class to add when item leaves the viewport, use white space as a delimeter to define multiple classes. */ leaveClass?: string | undefined; /** * Specifies the `root` option of the IntersectionObserver API - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/root) */ root?: Element | Document | null; /** * Specifies the `rootMargin` option of the IntersectionObserver API - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/rootMargin) */ rootMargin?: string; /** * Specifies the `threshold` option of the IntersectionObserver API - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/thresholds) */ threshold?: ReadonlyArray; - /** - * Whether the `enterClass` animation will run if the target is in the viewport when the page is loaded. - */ - animateOnLoad?: boolean; - /** - * Used to pass attributes to DOM elements inside the component. - * @type {AnimateOnScrollDirectivePassThroughOptions} - */ - pt?: PassThrough; - /** - * Used to configure passthrough(pt) options of the component. - * @type {PassThroughOptions} - */ - ptOptions?: PassThroughOptions; } /** diff --git a/components/lib/animateonscroll/AnimateOnScroll.js b/components/lib/animateonscroll/AnimateOnScroll.js index ace8894df..ff4ef9dbd 100644 --- a/components/lib/animateonscroll/AnimateOnScroll.js +++ b/components/lib/animateonscroll/AnimateOnScroll.js @@ -43,7 +43,7 @@ const AnimateOnScroll = BaseAnimateOnScroll.extend('animateonscroll', { entry.isIntersecting ? this.enter() : this.leave(); } } else if (entry.isIntersecting) { - this.$value.animateOnLoad ? this.enter() : (this.$el.style.opacity = ''); + this.enter(); } this.isObserverActive = true; diff --git a/doc/animateonscroll/BasicDoc.vue b/doc/animateonscroll/BasicDoc.vue index 9b7cecb8b..d9031edde 100644 --- a/doc/animateonscroll/BasicDoc.vue +++ b/doc/animateonscroll/BasicDoc.vue @@ -26,10 +26,6 @@ zoom
-
- zoom-down -
-
flip-left
@@ -68,10 +64,6 @@ export default { zoom
-
- zoom-down -
-
flip-left
@@ -111,10 +103,6 @@ export default { zoom
-
- zoom-down -
-
flip-left
@@ -155,10 +143,6 @@ export default { zoom
-
- zoom-down -
-
flip-left