| 38 | |
| 39 | |
| 40 | class StringScroll { |
| 41 | private static i: StringScroll; |
| 42 | private wH: number |
| 43 | private wW: number |
| 44 | |
| 45 | private onScrollEvents: Array<any> = new Array<any>() |
| 46 | private onScrollLerpEvents: Array<any> = new Array<any>() |
| 47 | |
| 48 | private sf: number = 1 |
| 49 | private cf: number = 1 |
| 50 | private f: number = 1 |
| 51 | |
| 52 | |
| 53 | private overflowCurrent = 0 |
| 54 | |
| 55 | private wheelBindFunc |
| 56 | private scrollBindFunc |
| 57 | |
| 58 | private animations: Array<StringAnimation> = new Array<StringAnimation>() |
| 59 | |
| 60 | private sEn: iStringScroll |
| 61 | private sEnDesktop: StringScrollSmooth |
| 62 | private sEnMobile: StringScrollDefault |
| 63 | private sEnDisable: StringScrollDisable |
| 64 | private eventManager: EventManager = new EventManager() |
| 65 | |
| 66 | private scrollbar: any |
| 67 | |
| 68 | |
| 69 | private animationGlobalCycle = ()=>{ |
| 70 | this.animationCycle() |
| 71 | } |
| 72 | private animationCycle = ()=>{} |
| 73 | |
| 74 | |
| 75 | get safariFactor(){ |
| 76 | return this.sf |
| 77 | } |
| 78 | set safariFactor(value: number){ |
| 79 | this.sf = value |
| 80 | if (isSafari()) { |
| 81 | this.sEnDesktop.setSpeedAccelerate(this.sA * this.sf) |
| 82 | this.sEnDisable.setSpeedAccelerate(this.sA * this.sf) |
| 83 | this.sEnMobile.setSpeedAccelerate(this.sA * this.sf) |
| 84 | this.sEnDesktop.setSpeedDecelerate(this.sD * this.sf) |
| 85 | this.sEnDisable.setSpeedDecelerate(this.sD * this.sf) |
| 86 | this.sEnMobile.setSpeedDecelerate(this.sD * this.sf) |
| 87 | } |
| 88 | } |
| 89 | get chromiumFactor(){ |
| 90 | return this.cf |
| 91 | } |
| 92 | set chromiumFactor(value: number){ |
| 93 | this.cf = value |
| 94 | if (!isSafari()) { |
| 95 | this.sEnDesktop.setSpeedAccelerate(this.sA * this.cf) |
| 96 | this.sEnDisable.setSpeedAccelerate(this.sA * this.cf) |
| 97 | this.sEnMobile.setSpeedAccelerate(this.sA * this.cf) |
nothing calls this directly
no outgoing calls
no test coverage detected