rfx-scroll-animation
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -188,7 +188,8 @@ (function (global, factory) { | ||
*/ | ||
RfxScrollAnimationDirective.prototype.toggleElement = function (visible) { | ||
RfxScrollAnimationDirective.prototype.toggleElement = function (visible, restoreListener) { | ||
if (restoreListener === void 0) { restoreListener = false; } | ||
this.elementVisible = visible; | ||
this.elementVisibleChange.emit(visible); | ||
this.setElementStyle(this.htmlElement.nativeElement, { name: 'opacity', value: String(+visible) }, { name: 'transform', value: this.getElementTransform(visible, this.animationType) }); | ||
if (this.isOnlyFirstTime && !visible) { | ||
if (restoreListener) { | ||
this.subscribeToMouseScroll(); | ||
@@ -195,0 +196,0 @@ } |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("rfx-scroll-animation",["exports","@angular/core","@angular/router","rxjs","rxjs/operators"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["rfx-scroll-animation"]={},t.ng.core,t.ng.router,t.rxjs,t.rxjs.operators)}(this,(function(t,e,n,i,o){"use strict";var r;(r=t.AnimationTypeEnum||(t.AnimationTypeEnum={})).NONE="none",r.TOP="top",r.BOTTOM="bottom",r.RIGHT="right",r.LEFT="left",r.ZOOM="zoom";var s=function(){function t(t){this.router=t,this.subjectScroll=new i.BehaviorSubject(void 0),this.subjectNavigation=new i.BehaviorSubject(!1)}return t.prototype.ngOnDestroy=function(){document.removeEventListener("scroll",this.mouseScroll)},t.prototype.initListeners=function(){var t=this;this.mouseScroll=this.onMouseScroll.bind(this),document.addEventListener("scroll",this.mouseScroll,!1),this.router.events.pipe(o.filter((function(t){return t instanceof n.NavigationEnd}))).subscribe((function(){t.subjectNavigation.next(!0)}))},t.prototype.onMouseScroll=function(){this.subjectScroll.next(void 0)},t.prototype.getMouseScroll=function(){return this.subjectScroll.asObservable()},t.prototype.getNavigationEndValue=function(){return this.subjectNavigation.value},t.prototype.getNavigationEnd=function(){return this.subjectNavigation.asObservable()},t}();s.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new s(e.ɵɵinject(n.Router))},token:s,providedIn:"root"}),s.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[{type:n.Router}]};var a=function(){function n(n,i,o,r){this.htmlElement=n,this.renderer=i,this.changeDetectorRef=o,this.rfxScrollAnimationService=r,this.elementVisibleChange=new e.EventEmitter,this.distanceFromPageBottomPercentage=20,this.animationDistancePx=25,this.transitionDurationMs=500,this.transitionTimingFunction="cubic-bezier(0.4, 0.0, 0.2, 1)",this.scaleRatio=1.5,this.isOnlyFirstTime=!0,this.elementVisible=!1,this.animationType=t.AnimationTypeEnum.NONE}return n.prototype.ngOnChanges=function(){this.animationType!==t.AnimationTypeEnum.NONE&&this.setInitialElementStyle()},n.prototype.ngOnInit=function(){var t=this;this.toggleElementInstantly(!1),this.rfxScrollAnimationService.getNavigationEnd().subscribe((function(e){e&&(t.initElement(),t.isOnlyFirstTime&&t.elementVisible||t.subscribeToMouseScroll())}))},n.prototype.subscribeToMouseScroll=function(){var t=this;this.onScrollListener=this.rfxScrollAnimationService.getMouseScroll().subscribe((function(){t.onMouseScroll()}))},n.prototype.ngOnDestroy=function(){this.onScrollListener&&this.onScrollListener.unsubscribe()},n.prototype.initElement=function(){var t=this.isElementInView(),e=t||this.isElementVisible();e&&!t?this.toggleElementInstantly(!0):e&&t&&this.toggleElement(!0)},n.prototype.setInitialElementStyle=function(){this.setElementStyle(this.htmlElement.nativeElement,{name:"transition-timing-function",value:this.transitionTimingFunction},{name:"transition-duration",value:this.transitionDurationMs+"ms"},{name:"transition-property",value:"opacity, transform"})},n.prototype.isElementInView=function(){var t=this.htmlElement.nativeElement.getBoundingClientRect(),e=t.top+window.pageYOffset-document.documentElement.clientTop,n=window.innerHeight/100*this.distanceFromPageBottomPercentage;return window.pageYOffset+window.innerHeight-n>=e&&window.pageYOffset<e+t.height},n.prototype.isElementVisible=function(){var t=window.scrollY+window.innerHeight,e=window.innerHeight/100*this.distanceFromPageBottomPercentage;return t>=this.htmlElement.nativeElement.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop+e},n.prototype.setElementStyle=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){e.renderer.setStyle(t,n.name,n.value)}))},n.prototype.removeElementStyle=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){e.renderer.removeStyle(t,n.name)}))},n.prototype.toggleElement=function(t){this.elementVisible=t,this.elementVisibleChange.emit(t),this.setElementStyle(this.htmlElement.nativeElement,{name:"opacity",value:String(+t)},{name:"transform",value:this.getElementTransform(t,this.animationType)}),this.isOnlyFirstTime&&!t&&this.subscribeToMouseScroll()},n.prototype.toggleElementInstantly=function(t){this.toggleTransition(!1),this.toggleElement(t),this.changeDetectorRef.detectChanges(),this.toggleTransition(!0)},n.prototype.getElementTransform=function(e,n){switch(n){case t.AnimationTypeEnum.TOP:return e?"translateY(0)":"translateY(-"+this.animationDistancePx+"px)";case t.AnimationTypeEnum.BOTTOM:return e?"translateY(0)":"translateY("+this.animationDistancePx+"px)";case t.AnimationTypeEnum.LEFT:return e?"translateX(0)":"translateX(-"+this.animationDistancePx+"px)";case t.AnimationTypeEnum.RIGHT:return e?"translateX(0)":"translateX("+this.animationDistancePx+"px)";case t.AnimationTypeEnum.ZOOM:return e?"scale(1)":"scale("+this.scaleRatio+")";default:return"none"}},n.prototype.toggleTransition=function(t){t?this.setElementStyle(this.htmlElement.nativeElement,{name:"transition-duration",value:this.transitionDurationMs+"ms"}):this.removeElementStyle(this.htmlElement.nativeElement,{name:"transition-duration"})},n.prototype.onMouseScroll=function(){this.isOnlyFirstTime&&this.elementVisible&&this.onScrollListener.unsubscribe();var t=this.isElementInView();t&&!this.elementVisible?this.toggleElement(!0):t||this.elementVisible||this.toggleElement(!1)},n}();a.decorators=[{type:e.Directive,args:[{selector:"[libRfxScrollAnimation]"}]}],a.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:s}]},a.propDecorators={distanceFromPageBottomPercentage:[{type:e.Input}],animationType:[{type:e.Input}],animationDistancePx:[{type:e.Input}],transitionDurationMs:[{type:e.Input}],transitionTimingFunction:[{type:e.Input}],scaleRatio:[{type:e.Input}],elementVisibleChange:[{type:e.Output}]};var l=function(){};l.decorators=[{type:e.NgModule,args:[{declarations:[a],imports:[],exports:[a]}]}],t.RfxScrollAnimationDirective=a,t.RfxScrollAnimationModule=l,t.RfxScrollAnimationService=s,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/router"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("rfx-scroll-animation",["exports","@angular/core","@angular/router","rxjs","rxjs/operators"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["rfx-scroll-animation"]={},t.ng.core,t.ng.router,t.rxjs,t.rxjs.operators)}(this,(function(t,e,n,i,o){"use strict";var r;(r=t.AnimationTypeEnum||(t.AnimationTypeEnum={})).NONE="none",r.TOP="top",r.BOTTOM="bottom",r.RIGHT="right",r.LEFT="left",r.ZOOM="zoom";var s=function(){function t(t){this.router=t,this.subjectScroll=new i.BehaviorSubject(void 0),this.subjectNavigation=new i.BehaviorSubject(!1)}return t.prototype.ngOnDestroy=function(){document.removeEventListener("scroll",this.mouseScroll)},t.prototype.initListeners=function(){var t=this;this.mouseScroll=this.onMouseScroll.bind(this),document.addEventListener("scroll",this.mouseScroll,!1),this.router.events.pipe(o.filter((function(t){return t instanceof n.NavigationEnd}))).subscribe((function(){t.subjectNavigation.next(!0)}))},t.prototype.onMouseScroll=function(){this.subjectScroll.next(void 0)},t.prototype.getMouseScroll=function(){return this.subjectScroll.asObservable()},t.prototype.getNavigationEndValue=function(){return this.subjectNavigation.value},t.prototype.getNavigationEnd=function(){return this.subjectNavigation.asObservable()},t}();s.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new s(e.ɵɵinject(n.Router))},token:s,providedIn:"root"}),s.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],s.ctorParameters=function(){return[{type:n.Router}]};var a=function(){function n(n,i,o,r){this.htmlElement=n,this.renderer=i,this.changeDetectorRef=o,this.rfxScrollAnimationService=r,this.elementVisibleChange=new e.EventEmitter,this.distanceFromPageBottomPercentage=20,this.animationDistancePx=25,this.transitionDurationMs=500,this.transitionTimingFunction="cubic-bezier(0.4, 0.0, 0.2, 1)",this.scaleRatio=1.5,this.isOnlyFirstTime=!0,this.elementVisible=!1,this.animationType=t.AnimationTypeEnum.NONE}return n.prototype.ngOnChanges=function(){this.animationType!==t.AnimationTypeEnum.NONE&&this.setInitialElementStyle()},n.prototype.ngOnInit=function(){var t=this;this.toggleElementInstantly(!1),this.rfxScrollAnimationService.getNavigationEnd().subscribe((function(e){e&&(t.initElement(),t.isOnlyFirstTime&&t.elementVisible||t.subscribeToMouseScroll())}))},n.prototype.subscribeToMouseScroll=function(){var t=this;this.onScrollListener=this.rfxScrollAnimationService.getMouseScroll().subscribe((function(){t.onMouseScroll()}))},n.prototype.ngOnDestroy=function(){this.onScrollListener&&this.onScrollListener.unsubscribe()},n.prototype.initElement=function(){var t=this.isElementInView(),e=t||this.isElementVisible();e&&!t?this.toggleElementInstantly(!0):e&&t&&this.toggleElement(!0)},n.prototype.setInitialElementStyle=function(){this.setElementStyle(this.htmlElement.nativeElement,{name:"transition-timing-function",value:this.transitionTimingFunction},{name:"transition-duration",value:this.transitionDurationMs+"ms"},{name:"transition-property",value:"opacity, transform"})},n.prototype.isElementInView=function(){var t=this.htmlElement.nativeElement.getBoundingClientRect(),e=t.top+window.pageYOffset-document.documentElement.clientTop,n=window.innerHeight/100*this.distanceFromPageBottomPercentage;return window.pageYOffset+window.innerHeight-n>=e&&window.pageYOffset<e+t.height},n.prototype.isElementVisible=function(){var t=window.scrollY+window.innerHeight,e=window.innerHeight/100*this.distanceFromPageBottomPercentage;return t>=this.htmlElement.nativeElement.getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop+e},n.prototype.setElementStyle=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){e.renderer.setStyle(t,n.name,n.value)}))},n.prototype.removeElementStyle=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];n.forEach((function(n){e.renderer.removeStyle(t,n.name)}))},n.prototype.toggleElement=function(t,e){void 0===e&&(e=!1),this.elementVisible=t,this.elementVisibleChange.emit(t),this.setElementStyle(this.htmlElement.nativeElement,{name:"opacity",value:String(+t)},{name:"transform",value:this.getElementTransform(t,this.animationType)}),e&&this.subscribeToMouseScroll()},n.prototype.toggleElementInstantly=function(t){this.toggleTransition(!1),this.toggleElement(t),this.changeDetectorRef.detectChanges(),this.toggleTransition(!0)},n.prototype.getElementTransform=function(e,n){switch(n){case t.AnimationTypeEnum.TOP:return e?"translateY(0)":"translateY(-"+this.animationDistancePx+"px)";case t.AnimationTypeEnum.BOTTOM:return e?"translateY(0)":"translateY("+this.animationDistancePx+"px)";case t.AnimationTypeEnum.LEFT:return e?"translateX(0)":"translateX(-"+this.animationDistancePx+"px)";case t.AnimationTypeEnum.RIGHT:return e?"translateX(0)":"translateX("+this.animationDistancePx+"px)";case t.AnimationTypeEnum.ZOOM:return e?"scale(1)":"scale("+this.scaleRatio+")";default:return"none"}},n.prototype.toggleTransition=function(t){t?this.setElementStyle(this.htmlElement.nativeElement,{name:"transition-duration",value:this.transitionDurationMs+"ms"}):this.removeElementStyle(this.htmlElement.nativeElement,{name:"transition-duration"})},n.prototype.onMouseScroll=function(){this.isOnlyFirstTime&&this.elementVisible&&this.onScrollListener.unsubscribe();var t=this.isElementInView();t&&!this.elementVisible?this.toggleElement(!0):t||this.elementVisible||this.toggleElement(!1)},n}();a.decorators=[{type:e.Directive,args:[{selector:"[libRfxScrollAnimation]"}]}],a.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:e.ChangeDetectorRef},{type:s}]},a.propDecorators={distanceFromPageBottomPercentage:[{type:e.Input}],animationType:[{type:e.Input}],animationDistancePx:[{type:e.Input}],transitionDurationMs:[{type:e.Input}],transitionTimingFunction:[{type:e.Input}],scaleRatio:[{type:e.Input}],elementVisibleChange:[{type:e.Output}]};var l=function(){};l.decorators=[{type:e.NgModule,args:[{declarations:[a],imports:[],exports:[a]}]}],t.RfxScrollAnimationDirective=a,t.RfxScrollAnimationModule=l,t.RfxScrollAnimationService=s,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=rfx-scroll-animation.umd.min.js.map |
@@ -108,7 +108,7 @@ import { ChangeDetectorRef, Directive, ElementRef, EventEmitter, Input, Output, Renderer2 } from '@angular/core'; | ||
*/ | ||
toggleElement(visible) { | ||
toggleElement(visible, restoreListener = false) { | ||
this.elementVisible = visible; | ||
this.elementVisibleChange.emit(visible); | ||
this.setElementStyle(this.htmlElement.nativeElement, { name: 'opacity', value: String(+visible) }, { name: 'transform', value: this.getElementTransform(visible, this.animationType) }); | ||
if (this.isOnlyFirstTime && !visible) { | ||
if (restoreListener) { | ||
this.subscribeToMouseScroll(); | ||
@@ -195,2 +195,2 @@ } | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmZ4LXNjcm9sbC1hbmltYXRpb24uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6Ii4uLy4uLy4uL3Byb2plY3RzL3JmeC1zY3JvbGwtYW5pbWF0aW9uL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9yZngtc2Nyb2xsLWFuaW1hdGlvbi5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGlCQUFpQixFQUFFLFNBQVMsRUFBRSxVQUFVLE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AgICApO1xyXG4gICAgfSBlbHNlIHtcclxuICAgICAgdGhpcy5yZW1vdmVFbGVtZW50U3R5bGUoXHJcbiAgICAgICAgdGhpcy5odG1sRWxlbWVudC5uYXRpdmVFbGVtZW50LFxyXG4gICAgICAgIHsgbmFtZTogJ3RyYW5zaXRpb24tZHVyYXRpb24nIH1cclxuICAgICAgKTtcclxuICAgIH1cclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIE9uIG1vdXNlIHNjcm9sbCBldmVudFxyXG4gICAqL1xyXG4gIHByaXZhdGUgb25Nb3VzZVNjcm9sbCgpOiB2b2lkIHtcclxuICAgIGlmICh0aGlzLmlzT25seUZpcnN0VGltZSAmJiB0aGlzLmVsZW1lbnRWaXNpYmxlKSB7XHJcbiAgICAgIHRoaXMub25TY3JvbGxMaXN0ZW5lci51bnN1YnNjcmliZSgpO1xyXG4gICAgfVxyXG5cclxuICAgIGNvbnN0IGlzRWxlbWVudEluVmlldzogYm9vbGVhbiA9IHRoaXMuaXNFbGVtZW50SW5WaWV3KCk7XHJcblxyXG4gICAgaWYgKGlzRWxlbWVudEluVmlldyAmJiAhdGhpcy5lbGVtZW50VmlzaWJsZSkge1xyXG4gICAgICB0aGlzLnRvZ2dsZUVsZW1lbnQodHJ1ZSk7XHJcbiAgICB9IGVsc2UgaWYgKCFpc0VsZW1lbnRJblZpZXcgJiYgIXRoaXMuZWxlbWVudFZpc2libGUpIHtcclxuICAgICAgdGhpcy50b2dnbGVFbGVtZW50KGZhbHNlKTtcclxuICAgIH1cclxuICB9XHJcbn1cclxuIl19 |
@@ -174,7 +174,7 @@ import { ɵɵdefineInjectable, ɵɵinject, Injectable, EventEmitter, Directive, ElementRef, Renderer2, ChangeDetectorRef, Input, Output, NgModule } from '@angular/core'; | ||
*/ | ||
toggleElement(visible) { | ||
toggleElement(visible, restoreListener = false) { | ||
this.elementVisible = visible; | ||
this.elementVisibleChange.emit(visible); | ||
this.setElementStyle(this.htmlElement.nativeElement, { name: 'opacity', value: String(+visible) }, { name: 'transform', value: this.getElementTransform(visible, this.animationType) }); | ||
if (this.isOnlyFirstTime && !visible) { | ||
if (restoreListener) { | ||
this.subscribeToMouseScroll(); | ||
@@ -181,0 +181,0 @@ } |
@@ -55,3 +55,3 @@ import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2 } from '@angular/core'; | ||
*/ | ||
toggleElement(visible: boolean): void; | ||
toggleElement(visible: boolean, restoreListener?: boolean): void; | ||
/** | ||
@@ -58,0 +58,0 @@ * Show / hide element instantly (without animation) from page |
{ | ||
"name": "rfx-scroll-animation", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "RfxScrollAnimation - animate your page elements on scroll", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133646
1006