%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
Server IP : 49.231.201.246 / Your IP : 216.73.216.149 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/ppaobm/vendor/bower-asset/fullcalendar/src/core/interactions/ |
Upload File : |
import { listenToHoverBySelector } from '../util/dom-event' import EventApi from '../api/EventApi' import { getElSeg } from '../component/event-rendering' import { Interaction, InteractionSettings } from './interaction' /* Triggers events and adds/removes core classNames when the user's pointer enters/leaves event-elements of a component. */ export default class EventHovering extends Interaction { removeHoverListeners: () => void currentSegEl: HTMLElement constructor(settings: InteractionSettings) { super(settings) let { component } = settings this.removeHoverListeners = listenToHoverBySelector( component.el, component.fgSegSelector + ',' + component.bgSegSelector, this.handleSegEnter, this.handleSegLeave ) component.calendar.on('eventElRemove', this.handleEventElRemove) } destroy() { this.removeHoverListeners() this.component.calendar.off('eventElRemove', this.handleEventElRemove) } // for simulating an eventMouseLeave when the event el is destroyed while mouse is over it handleEventElRemove = (el: HTMLElement) => { if (el === this.currentSegEl) { this.handleSegLeave(null, this.currentSegEl) } } handleSegEnter = (ev: Event, segEl: HTMLElement) => { if (getElSeg(segEl)) { // TODO: better way to make sure not hovering over more+ link or its wrapper segEl.classList.add('fc-allow-mouse-resize') this.currentSegEl = segEl this.triggerEvent('eventMouseEnter', ev, segEl) } } handleSegLeave = (ev: Event | null, segEl: HTMLElement) => { if (this.currentSegEl) { segEl.classList.remove('fc-allow-mouse-resize') this.currentSegEl = null this.triggerEvent('eventMouseLeave', ev, segEl) } } triggerEvent(publicEvName: string, ev: Event | null, segEl: HTMLElement) { let { component } = this let seg = getElSeg(segEl)! if (!ev || component.isValidSegDownEl(ev.target as HTMLElement)) { component.publiclyTrigger(publicEvName, [ { el: segEl, event: new EventApi( this.component.calendar, seg.eventRange.def, seg.eventRange.instance ), jsEvent: ev, view: component.view } ]) } } }