UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

246 lines (236 loc) 30.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCursor = getCursor; exports.getTooltip = getTooltip; exports.isDrawingActive = isDrawingActive; exports.onClick = onClick; exports.onHover = onHover; var _constants = require("@kepler.gl/constants"); // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project /** * Returns true if drawing is active. * @param editorMenuActive Indicates whether the editor side menu is active. * @param mode Current editing mode. * @returs Returns true if drawing is active. */ function isDrawingActive(editorMenuActive, mode) { return editorMenuActive && (mode === _constants.EDITOR_MODES.DRAW_POLYGON || mode === _constants.EDITOR_MODES.DRAW_RECTANGLE); } /** * Handles click event for Editor layer. * @param info Information about clicked object. * @param event Event object. * @param params * @param params.editorMenuActive * @param params.editor * @param params.onLayerClick * @param params.setSelectedFeature * @param params.mapIndex * @returns Returns true is the click is handled. */ // eslint-disable-next-line complexity function onClick(info, event, _ref) { var _info$layer; var editorMenuActive = _ref.editorMenuActive, editor = _ref.editor, setSelectedFeature = _ref.setSelectedFeature, onLayerClick = _ref.onLayerClick, _ref$mapIndex = _ref.mapIndex, mapIndex = _ref$mapIndex === void 0 ? 0 : _ref$mapIndex; var drawingActive = isDrawingActive(editorMenuActive, editor.mode); if ((info === null || info === void 0 || (_info$layer = info.layer) === null || _info$layer === void 0 ? void 0 : _info$layer.id) === _constants.EDITOR_LAYER_ID && info !== null && info !== void 0 && info.object) { var _info$object$geometry; var objectType = (_info$object$geometry = info.object.geometry) === null || _info$object$geometry === void 0 ? void 0 : _info$object$geometry.type; if (drawingActive) { if (editor.selectedFeature) { setSelectedFeature(null); } } else if (objectType !== null && objectType !== void 0 && objectType.endsWith('Polygon') || objectType !== null && objectType !== void 0 && objectType.endsWith('Point')) { var _event$srcEvent; var clickContext; if (event.rightButton && Array.isArray((_event$srcEvent = event.srcEvent) === null || _event$srcEvent === void 0 ? void 0 : _event$srcEvent.point)) { var point = event.srcEvent.point; clickContext = { mapIndex: mapIndex, rightClick: true, position: { x: point[0], y: point[1] } }; } if (objectType !== null && objectType !== void 0 && objectType.endsWith('Polygon')) { setSelectedFeature(info.object, clickContext); } else { // don't select points setSelectedFeature(editor.selectedFeature, clickContext); } } // hide tooltips from regular data layers onLayerClick(null, event); } else if (drawingActive) { // prevent interaction with other layers onLayerClick(null, event); } else { if (editor.selectedFeature) { if (event.rightButton) { return true; } // click outside removes selection setSelectedFeature(null); } return false; } return true; } /** * Handles hover event for Editor layer. * @param info Information about hovered object. * @param params * @param params.editorMenuActive * @param params.editor * @param params.hoverInfo * @returns Returns true is hover is handled. */ function onHover(info, _ref2) { var _info$layer2, _hoverInfo$layer; var hoverInfo = _ref2.hoverInfo, editor = _ref2.editor, editorMenuActive = _ref2.editorMenuActive; if (isDrawingActive(editorMenuActive, editor.mode)) { return true; } return (info === null || info === void 0 || (_info$layer2 = info.layer) === null || _info$layer2 === void 0 ? void 0 : _info$layer2.id) === _constants.EDITOR_LAYER_ID && (hoverInfo === null || hoverInfo === void 0 || (_hoverInfo$layer = hoverInfo.layer) === null || _hoverInfo$layer === void 0 ? void 0 : _hoverInfo$layer.id) === _constants.EDITOR_LAYER_ID; } /** * For small tooltips with short messages, e.g. "Drag to move the point", * use the values below to decide when to position a tooltip to the left * of the cursor or above the cursor, depending on proximity to the edge of * the viewport to prevent the tooltip from being cut off. */ var MIN_DISTANCE_TO_LEFT_EDGE = 200; var MIN_DISTANCE_TO_BOTTOM_EDGE = 100; /** * Returns tooltip based on interactions with Editor layer. * @param info Information about hovered object. * @param params * @param params.editorMenuActive * @param params.editor * @param params.theme * @raturns Returns a tooltip object compatible with Deck.getTooltip() */ // eslint-disable-next-line complexity function getTooltip( // TODO PickInfo type in deck typings doesn't include viewport and pixel info, _ref3) { var _editor$selectionCont; var editor = _ref3.editor, theme = _ref3.theme, editorMenuActive = _ref3.editorMenuActive; var object = info.object, layer = info.layer, _info$viewport = info.viewport, viewport = _info$viewport === void 0 ? {} : _info$viewport, _info$pixel = info.pixel, pixel = _info$pixel === void 0 ? [] : _info$pixel; var closeToLeftEdge = (viewport === null || viewport === void 0 ? void 0 : viewport.width) - pixel[0] < MIN_DISTANCE_TO_LEFT_EDGE; var closeToBottomEdge = (viewport === null || viewport === void 0 ? void 0 : viewport.height) - pixel[1] < MIN_DISTANCE_TO_BOTTOM_EDGE; // don't show the tooltip when the menu is visible if ((_editor$selectionCont = editor.selectionContext) !== null && _editor$selectionCont !== void 0 && _editor$selectionCont.rightClick) { return null; } if (isDrawingActive(editorMenuActive, editor.mode)) { var _layer$state; // TODO save interaction state in editor object if (layer !== null && layer !== void 0 && (_layer$state = layer.state) !== null && _layer$state !== void 0 && (_layer$state = _layer$state.mode) !== null && _layer$state !== void 0 && (_layer$state = _layer$state._clickSequence) !== null && _layer$state !== void 0 && _layer$state.length) { return null; } return getTooltipObject('Click to start new feature', theme, { leftOfCursor: closeToLeftEdge, aboveCursor: closeToBottomEdge }); } if ((layer === null || layer === void 0 ? void 0 : layer.id) === _constants.EDITOR_LAYER_ID) { var _object$properties, _object$geometry, _object$properties2; var selectedFeature = editor.selectedFeature; if (selectedFeature) { if (!object || object.id && object.id === selectedFeature.id) { return getTooltipObject('Right click to view options\nDrag to move the feature', theme, { leftOfCursor: closeToLeftEdge, aboveCursor: closeToBottomEdge }); } } if ((object === null || object === void 0 || (_object$properties = object.properties) === null || _object$properties === void 0 ? void 0 : _object$properties.editHandleType) === 'intermediate') { return getTooltipObject('Click to insert a point', theme, { leftOfCursor: closeToLeftEdge, aboveCursor: closeToBottomEdge }); } if ((object === null || object === void 0 || (_object$geometry = object.geometry) === null || _object$geometry === void 0 ? void 0 : _object$geometry.type) === 'Point' || (object === null || object === void 0 || (_object$properties2 = object.properties) === null || _object$properties2 === void 0 ? void 0 : _object$properties2.guideType) === 'tentative') { return getTooltipObject('Drag to move the point', theme, { leftOfCursor: closeToLeftEdge, aboveCursor: closeToBottomEdge }); } return getTooltipObject('Click to select the feature\nRight click to view options', theme, { leftOfCursor: closeToLeftEdge, aboveCursor: closeToBottomEdge }); } return null; } /** * Returns cursor type based on interactions with Editor layer. * @param params * @param params.editorMenuActive * @param params.editor * @param params.hoverInfo * @returns Returns cursor type. */ function getCursor(_ref4) { var _hoverInfo$layer2; var editorMenuActive = _ref4.editorMenuActive, editor = _ref4.editor, hoverInfo = _ref4.hoverInfo; if (isDrawingActive(editorMenuActive, editor.mode)) { return 'crosshair'; } if ((hoverInfo === null || hoverInfo === void 0 || (_hoverInfo$layer2 = hoverInfo.layer) === null || _hoverInfo$layer2 === void 0 ? void 0 : _hoverInfo$layer2.id) === _constants.EDITOR_LAYER_ID && editor.selectedFeature) { return 'move'; } return null; } /** * Returns a tooltip object that can be used as a Deck tooltip. * Positioning can be modified if the cursor is close to the bottom or left edge of the viewport. * @param text Text to show. * @param theme Current theme. * @param position.leftOfCursor Tooltip should display to the left of the cursor. * @param position.aboveCursor Tooltip should display above cursor. */ function getTooltipObject(text, theme, position) { var leftOfCursor = position.leftOfCursor, aboveCursor = position.aboveCursor; var marginTop = aboveCursor ? '-70px' : '15px'; var marginLeft = leftOfCursor ? '-200px' : '15px'; return { text: text, style: { 'margin-top': marginTop, 'margin-left': marginLeft, 'font-family': theme.fontFamily, 'font-size': theme.tooltipFontSize, 'font-weight': 400, padding: '7px 18px', 'box-shadow': theme.tooltipBoxShadow, 'background-color': theme.tooltipBg, color: theme.tooltipColor, 'border-radius': theme.primaryBtnRadius } }; } //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY29uc3RhbnRzIiwicmVxdWlyZSIsImlzRHJhd2luZ0FjdGl2ZSIsImVkaXRvck1lbnVBY3RpdmUiLCJtb2RlIiwiRURJVE9SX01PREVTIiwiRFJBV19QT0xZR09OIiwiRFJBV19SRUNUQU5HTEUiLCJvbkNsaWNrIiwiaW5mbyIsImV2ZW50IiwiX3JlZiIsIl9pbmZvJGxheWVyIiwiZWRpdG9yIi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