| File was renamed from applications/drone-command/src/utils/cesium/shapeTools/Tooltip.js |
| | |
| | | export class MapTooltip { |
| | | export class MapTooltip { |
| | | constructor(viewer, options = {}) { |
| | | this.viewer = viewer |
| | | this.options = options |
| | |
| | | if (!this.tooltipEl || !position) return |
| | | const width = this.container?.clientWidth ?? 0 |
| | | const height = this.container?.clientHeight ?? 0 |
| | | if ( |
| | | !width || |
| | | !height || |
| | | position.x < 0 || |
| | | position.y < 0 || |
| | | position.x > width || |
| | | position.y > height |
| | | ) { |
| | | if (!width || !height || position.x < 0 || position.y < 0 || position.x > width || position.y > height) { |
| | | this.hide() |
| | | return |
| | | } |