UNPKG

@deltares/fews-ssd-requests

Version:

Library for making requests to the FEWS SSD webservice

16 lines 735 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addLeftClickAction = void 0; const FEWS_NAME_SPACE_js_1 = require("../response/FEWS_NAME_SPACE.js"); function addLeftClickAction(svg, clickCallback) { svg.querySelectorAll('*').forEach(function (el) { // clickable elements get a pointer cursor, the others (like text) get the default cursor if (el.hasAttributeNS(FEWS_NAME_SPACE_js_1.FEWS_NAMESPACE, 'click')) { el.addEventListener('click', clickCallback); el.style.cursor = 'pointer'; el.setAttribute('pointer-events', 'auto'); } }); } exports.addLeftClickAction = addLeftClickAction; //# sourceMappingURL=addLeftClickAction.js.map