Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Bug] Readjust the position of the map popover when it extends beyond the right and top edges of screen (#47)
Jon Sadkae6b47837063d
diff --git a/src/components/map/map-popover.js b/src/components/map/map-popover.jsindex b8fdca094..2ccf62704 100644--- a/src/components/map/map-popover.js+++ b/src/components/map/map-popover.js@@ -143,13 +143,13 @@ export class MapPopover extends Component {const {mapState} = this.props;const {width, height} = this.state;const pos = {};- if (x + leftOffset + width > mapState.innerWidth) {- pos.right = mapState.innerWidth - x + leftOffset;+ if (x + leftOffset + width > mapState.width) {+ pos.right = mapState.width - x + leftOffset;} else {pos.left = x + leftOffset;}- if (y + topOffset + height > mapState.innerHeight) {+ if (y + topOffset + height > mapState.height) {pos.bottom = 10;} else {pos.top = y + topOffset;