Popup fixes

This commit is contained in:
2026-06-27 17:47:38 -04:00
parent 34c52ffb9f
commit 835856e74c
6 changed files with 13 additions and 21 deletions

View File

@@ -9,11 +9,10 @@ import { Vector as VectorLayer } from 'ol/layer'
import { Vector as VectorSource } from 'ol/source'
import { adjustedInterval } from '@ztimson/utils'
import ShipPopup from '@/components/Ship.vue'
import { bringToFront } from './zindex'
const API = BASE + '/api'
let highestZIndex = 1000
const SHIP_COLORS: Record<string, string> = {
'Base Station': '#00aaff',
'Class A': '#00ff00',
@@ -136,10 +135,7 @@ export class AISLayer {
boat: boatRef.value,
position: mobile ? {x: window.innerWidth / 2 - 180, y: window.innerHeight - 380 - 16} : {x: window.innerWidth - 360 - 16, y: 16},
onClose: () => this._closePopup(mmsi),
onBringToFront: () => {
highestZIndex++
container.style.zIndex = String(highestZIndex)
},
onBringToFront: () => bringToFront(container),
})
app.mount(container)