all files / lib/ mouse-event-helper.js

53.85% Statements 7/13
57.14% Branches 4/7
66.67% Functions 2/3
58.33% Lines 7/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22                          20×    
"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
 * Helper function to enhance browser mouse events to Leaflet mouse events
 * @private
 */
function enhanceMouseEvent(originalEvent, map) {
    return __assign({}, originalEvent, { containerPoint: map.mouseEventToContainerPoint(originalEvent), latlng: map.mouseEventToLatLng(originalEvent), layerPoint: map.mouseEventToLayerPoint(originalEvent), originalEvent: originalEvent });
}
exports.enhanceMouseEvent = enhanceMouseEvent;
//# sourceMappingURL=mouse-event-helper.js.map