UNPKG

ng-zorro-antd-yj

Version:

An enterprise-class UI components based on Ant Design and Angular

62 lines 3.1 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @record */ export function ClickPosition() { } if (false) { /** @type {?} */ ClickPosition.prototype.x; /** @type {?} */ ClickPosition.prototype.y; } var ModalUtil = /** @class */ (function () { function ModalUtil(document) { this.document = document; this.lastPosition = null; this.listenDocumentClick(); } /** * @return {?} */ ModalUtil.prototype.getLastClickPosition = /** * @return {?} */ function () { return this.lastPosition; }; /** * @return {?} */ ModalUtil.prototype.listenDocumentClick = /** * @return {?} */ function () { var _this = this; this.document.addEventListener('click', (/** * @param {?} event * @return {?} */ function (event) { _this.lastPosition = { x: event.clientX, y: event.clientY }; })); }; return ModalUtil; }()); export { ModalUtil }; if (false) { /** * @type {?} * @private */ ModalUtil.prototype.lastPosition; /** * @type {?} * @private */ ModalUtil.prototype.document; } export default new ModalUtil(document); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtdXRpbC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLXpvcnJvLWFudGQteWovIiwic291cmNlcyI6WyJtb2RhbC9tb2RhbC11dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQSxtQ0FHQzs7O0lBRkMsMEJBQVU7O0lBQ1YsMEJBQVU7O0FBR1o7SUFHRSxtQkFBb0IsUUFBa0I7UUFBbEIsYUFBUSxHQUFSLFFBQVEsQ0FBVTtRQUY5QixpQkFBWSxHQUF5QixJQUFJLENBQUM7UUFHaEQsSUFBSSxDQUFDLG1CQUFtQixFQUFFLENBQUM7SUFDN0IsQ0FBQzs7OztJQUVELHdDQUFvQjs7O0lBQXBCO1FBQ0UsT0FBTyxJQUFJLENBQUMsWUFBWSxDQUFDO0lBQzNCLENBQUM7Ozs7SUFFRCx1Q0FBbU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