'use strict'; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * Licensed Materials - Property of IBM * IBM Watson Analytics (C) Copyright IBM Corp. 2018, 2019 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['./EventTarget', 'jquery', '../../../util/KeyCodes'], function (EventTarget, $, KeyCodes) { var NonVIPREventTarget = function (_EventTarget) { _inherits(NonVIPREventTarget, _EventTarget); function NonVIPREventTarget() { _classCallCheck(this, NonVIPREventTarget); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _possibleConstructorReturn(this, _EventTarget.call.apply(_EventTarget, [this].concat(args))); } NonVIPREventTarget.prototype.getTargetsByCords = function getTargetsByCords() { return []; }; NonVIPREventTarget.prototype.decorateTarget = function decorateTarget() { //IndentedList and Table support decorate by default return true; }; NonVIPREventTarget.prototype.getDecoration = function getDecoration() {}; NonVIPREventTarget.prototype.getValuesAtPoint = function getValuesAtPoint() /*event , offset*/{}; NonVIPREventTarget.prototype.completeDecorations = function completeDecorations() {}; NonVIPREventTarget.prototype.applyCustomDataSelection = function applyCustomDataSelection() {}; NonVIPREventTarget.prototype.getCustomDataSelections = function getCustomDataSelections() { return []; }; NonVIPREventTarget.prototype.canZoom = function canZoom() { return false; }; NonVIPREventTarget.prototype.zoom = function zoom() {}; NonVIPREventTarget.prototype.zoomStart = function zoomStart() {}; NonVIPREventTarget.prototype.zoomEnd = function zoomEnd() {}; NonVIPREventTarget.prototype.pan = function pan() {}; NonVIPREventTarget.prototype.panStart = function panStart() {}; NonVIPREventTarget.prototype.panEnd = function panEnd() {}; NonVIPREventTarget.prototype._getKeyDownEventCoordinates = function _getKeyDownEventCoordinates(event) { event.clientX = $(event.target).offset().left + event.target.offsetWidth / 2; event.clientY = $(event.target).offset().top + event.target.offsetHeight / 2; return event; }; NonVIPREventTarget.prototype._getTargetNode = function _getTargetNode() { var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return event.gesture ? event.gesture.target : event.target; }; NonVIPREventTarget.prototype._canProcessKeyDown = function _canProcessKeyDown(event) { return event.type === 'keydown' && event.keyCode === KeyCodes.KEY_ENTER; }; NonVIPREventTarget.prototype.processKeyDown = function processKeyDown(event) { var result = this._canProcessKeyDown(event); if (result) { this._getKeyDownEventCoordinates(event); } return result; }; NonVIPREventTarget.prototype.mouseWithinBoundCheck = function mouseWithinBoundCheck(event) { if (this.getTargetElement()) { var boundingRect = this.getTargetElement().get(0).getBoundingClientRect(); return event.pageX > boundingRect.left && event.pageX < boundingRect.right && event.pageY > boundingRect.top && event.pageY < boundingRect.bottom; } return false; }; return NonVIPREventTarget; }(EventTarget); return NonVIPREventTarget; }); //# sourceMappingURL=NonVIPREventTarget.js.map