UNPKG

geospatialdraw

Version:
41 lines 1.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var MockMap = /** @class */ (function () { function MockMap() { this.testData = null; // Change to 'any' type or define a proper interface this.testData = { layerCount: 0, interactions: {}, interactionsCount: 0, layers: [], eventListeners: { pointerdrag: new Set(), mousemove: new Set(), }, }; } MockMap.prototype.addInteraction = function (i) { this.testData.interactions[i] = i; this.testData.interactionsCount++; }; MockMap.prototype.removeInteraction = function (i) { this.testData.interactions[i]; this.testData.interactionsCount--; }; MockMap.prototype.addLayer = function (layer) { this.testData.layerCount++; this.testData.layers.push(layer); }; MockMap.prototype.getTestData = function () { return this.testData; }; MockMap.prototype.on = function (event, listener) { this.testData.eventListeners[event].add(listener); }; MockMap.prototype.un = function (event, listener) { this.testData.eventListeners[event].delete(listener); }; return MockMap; }()); exports.default = MockMap; //# sourceMappingURL=mock-map.js.map