1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 'use strict';
- define(['../../lib/@waca/core-client/js/core-client/ui/core/Class'], function (Class) {
- var EventChainLocal = null;
-
- 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;
- });
|