source: trip-planner-front/node_modules/primeng/fesm2020/primeng-ripple.mjs.map@ b738035

Last change on this file since b738035 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 6.6 KB
Line 
1{"version":3,"file":"primeng-ripple.mjs","sources":["../../src/app/components/ripple/ripple.ts","../../src/app/components/ripple/primeng-ripple.ts"],"sourcesContent":["import { NgModule, Directive, AfterViewInit, ElementRef, NgZone, OnDestroy, Optional } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomHandler } from 'primeng/dom';\nimport { PrimeNGConfig } from 'primeng/api';\n\n@Directive({\n selector: '[pRipple]',\n host: {\n 'class': 'p-ripple p-element'\n }\n})\nexport class Ripple implements AfterViewInit, OnDestroy {\n\n constructor(public el: ElementRef, public zone: NgZone, @Optional() public config: PrimeNGConfig) { }\n\n animationListener: any;\n\n mouseDownListener: any;\n\n ngAfterViewInit() {\n if (this.config && this.config.ripple) {\n this.zone.runOutsideAngular(() => {\n this.create();\n\n this.mouseDownListener = this.onMouseDown.bind(this);\n this.el.nativeElement.addEventListener('mousedown', this.mouseDownListener);\n });\n }\n }\n\n onMouseDown(event: MouseEvent) {\n let ink = this.getInk();\n if (!ink || getComputedStyle(ink, null).display === 'none') {\n return;\n }\n\n DomHandler.removeClass(ink, 'p-ink-active');\n if (!DomHandler.getHeight(ink) && !DomHandler.getWidth(ink)) {\n let d = Math.max(DomHandler.getOuterWidth(this.el.nativeElement), DomHandler.getOuterHeight(this.el.nativeElement));\n ink.style.height = d + 'px';\n ink.style.width = d + 'px';\n }\n\n let offset = DomHandler.getOffset(this.el.nativeElement);\n let x = event.pageX - offset.left + document.body.scrollTop - DomHandler.getWidth(ink) / 2;\n let y = event.pageY - offset.top + document.body.scrollLeft - DomHandler.getHeight(ink) / 2;\n\n ink.style.top = y + 'px';\n ink.style.left = x + 'px';\n DomHandler.addClass(ink, 'p-ink-active');\n }\n\n getInk() {\n for (let i = 0; i < this.el.nativeElement.children.length; i++) {\n if (this.el.nativeElement.children[i].className.indexOf('p-ink') !== -1) {\n return this.el.nativeElement.children[i];\n }\n }\n return null;\n }\n\n resetInk() {\n let ink = this.getInk();\n if (ink) {\n DomHandler.removeClass(ink, 'p-ink-active');\n }\n }\n\n onAnimationEnd(event) {\n DomHandler.removeClass(event.currentTarget, 'p-ink-active');\n }\n\n create() {\n let ink = document.createElement('span');\n ink.className = 'p-ink';\n this.el.nativeElement.appendChild(ink);\n\n this.animationListener = this.onAnimationEnd.bind(this);\n ink.addEventListener('animationend', this.animationListener);\n }\n\n remove() {\n let ink = this.getInk();\n if (ink) {\n this.el.nativeElement.removeEventListener('mousedown', this.mouseDownListener);\n ink.removeEventListener('animationend', this.animationListener);\n DomHandler.removeElement(ink);\n }\n }\n\n ngOnDestroy() {\n if (this.config && this.config.ripple) {\n this.remove();\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [Ripple],\n declarations: [Ripple]\n})\nexport class RippleModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAWa,MAAM;IAEf,YAAmB,EAAc,EAAS,IAAY,EAAqB,MAAqB;QAA7E,OAAE,GAAF,EAAE,CAAY;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAAqB,WAAM,GAAN,MAAM,CAAe;KAAK;IAMrG,eAAe;QACX,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;gBACxB,IAAI,CAAC,MAAM,EAAE,CAAC;gBAEd,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACrD,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;aAC/E,CAAC,CAAC;SACN;KACJ;IAED,WAAW,CAAC,K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