This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/mixins/translatable/index.js.map
2019-08-11 20:48:02 +02:00

1 line
No EOL
2.9 KiB
Text

{"version":3,"sources":["../../../src/mixins/translatable/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAP,MAAgB,KAAhB;AAEA,eAAe,GAAG,CAAC,MAAJ,CAAW;AACxB,EAAA,IAAI,EAAE,cADkB;AAGxB,EAAA,KAAK,EAAE;AACL,IAAA,MAAM,EAAE;AADH,GAHiB;AAOxB,EAAA,IAAI,EAAE,OAAO;AACX,IAAA,WAAW,EAAE,CADF;AAEX,IAAA,QAAQ,EAAE,CAFC;AAGX,IAAA,YAAY,EAAE,CAHH;AAIX,IAAA,eAAe,EAAE,CAJN;AAKX,IAAA,SAAS,EAAE,CALA;AAMX,IAAA,YAAY,EAAE,CANH;AAOX,IAAA,YAAY,EAAE;AAPH,GAAP,CAPkB;AAiBxB,EAAA,QAAQ,EAAE;AACR,IAAA,SAAS,GAAA;AACP,aAAO,KAAK,SAAL,EAAP;AACD;;AAHO,GAjBc;;AAuBxB,EAAA,aAAa,GAAA;AACX,IAAA,MAAM,CAAC,mBAAP,CAA2B,QAA3B,EAAqC,KAAK,SAA1C,EAAqD,KAArD;AACA,IAAA,MAAM,CAAC,mBAAP,CAA2B,QAA3B,EAAqC,KAAK,SAA1C,EAAqD,KAArD;AACD,GA1BuB;;AA4BxB,EAAA,OAAO,EAAE;AACP,IAAA,cAAc,GAAA;AACZ,YAAM,MAAM,GAAG,KAAK,GAAL,CAAS,qBAAT,EAAf;AAEA,WAAK,SAAL,GAAiB,MAAM,CAAC,WAAxB;AACA,WAAK,YAAL,GAAoB,KAAK,SAAL,GAAiB,KAAK,MAA1C;AACA,WAAK,WAAL,GAAmB,MAAM,CAAC,GAAP,GAAa,KAAK,SAArC;AACA,WAAK,YAAL,GAAoB,MAAM,CAAC,WAA3B;AACA,WAAK,YAAL,GAAoB,KAAK,SAAL,GAAiB,KAAK,YAA1C;AACD,KATM;;AAUP,IAAA,SAAS,GAAA;AACP,MAAA,MAAM,CAAC,gBAAP,CAAwB,QAAxB,EAAkC,KAAK,SAAvC,EAAkD,KAAlD;AACA,MAAA,MAAM,CAAC,gBAAP,CAAwB,QAAxB,EAAkC,KAAK,SAAvC,EAAkD,KAAlD;AACD,KAbM;;AAcP;AACA,IAAA,SAAS,GAAA;AACP,YAAM,IAAI,KAAJ,CAAU,mBAAV,CAAN;AACD,KAjBM;;AAkBP,IAAA,SAAS,GAAA;AACP,WAAK,cAAL;AAEA,WAAK,eAAL,GACE,CAAC,KAAK,YAAL,GAAoB,KAAK,WAA1B,KACC,QAAQ,CAAC,KAAK,MAAN,CAAR,GAAwB,KAAK,YAD9B,CADF;AAKA,WAAK,QAAL,GAAgB,IAAI,CAAC,KAAL,CAAW,KAAK,YAAL,GAAoB,KAAK,eAApC,CAAhB;AACD;;AA3BM;AA5Be,CAAX,CAAf","sourcesContent":["import Vue from 'vue'\n\nexport default Vue.extend({\n name: 'translatable',\n\n props: {\n height: Number,\n },\n\n data: () => ({\n elOffsetTop: 0,\n parallax: 0,\n parallaxDist: 0,\n percentScrolled: 0,\n scrollTop: 0,\n windowHeight: 0,\n windowBottom: 0,\n }),\n\n computed: {\n imgHeight (): number {\n return this.objHeight()\n },\n },\n\n beforeDestroy () {\n window.removeEventListener('scroll', this.translate, false)\n window.removeEventListener('resize', this.translate, false)\n },\n\n methods: {\n calcDimensions () {\n const offset = this.$el.getBoundingClientRect()\n\n this.scrollTop = window.pageYOffset\n this.parallaxDist = this.imgHeight - this.height\n this.elOffsetTop = offset.top + this.scrollTop\n this.windowHeight = window.innerHeight\n this.windowBottom = this.scrollTop + this.windowHeight\n },\n listeners () {\n window.addEventListener('scroll', this.translate, false)\n window.addEventListener('resize', this.translate, false)\n },\n /** @abstract **/\n objHeight (): number {\n throw new Error('Not implemented !')\n },\n translate () {\n this.calcDimensions()\n\n this.percentScrolled = (\n (this.windowBottom - this.elOffsetTop) /\n (parseInt(this.height) + this.windowHeight)\n )\n\n this.parallax = Math.round(this.parallaxDist * this.percentScrolled)\n },\n },\n})\n"],"sourceRoot":"","file":"index.js"}