1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 'use strict';
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2014, 2017
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../lib/@waca/core-client/js/core-client/ui/core/Class'], function (Class) {
- var EventChainLocal = null;
- /**
- * Provide ability to store local variables that can be accessed
- * by event handlers that are handling the same event down the chain.
- *
- */
- EventChainLocal = Class.extend({
- init: function init(event) {
- this.event = event;
- },
- _getSourceEvent: function _getSourceEvent() {
- var srcEvent;
- if (this.event.gesture) {
- srcEvent = this.event.gesture.srcEvent;
- } else if (this.event.originalEvent) {
- srcEvent = this.event.originalEvent;
- } else {
- srcEvent = this.event;
- }
- return srcEvent;
- },
- _getPropertyMap: function _getPropertyMap() {
- var evt = this._getSourceEvent();
- if (!evt._eventChainLocalMap) {
- evt._eventChainLocalMap = {};
- }
- return evt._eventChainLocalMap;
- },
- setProperty: function setProperty(name, value) {
- this._getPropertyMap()[name] = value;
- },
- getProperty: function getProperty(name) {
- return this._getPropertyMap()[name];
- }
- });
- return EventChainLocal;
- });
- //# sourceMappingURL=EventChainLocal.js.map
|