Skip to content

Commit

Permalink
Fix TS checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Aug 8, 2024
1 parent 903c32a commit 12744aa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
12 changes: 6 additions & 6 deletions api/web/src/components/CloudTAK/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,11 @@
<SideMenu
v-if='
isLoaded
&& !pointInput
&& (
(noMenuShown && !mobileDetected)
|| (!noMenuShown)
)
&& !pointInput
&& (
(noMenuShown && !mobileDetected)
|| (!noMenuShown)
)
'
:compact='noMenuShown'
/>
Expand Down Expand Up @@ -614,7 +614,7 @@ export default {
this.$emit('err', new Error(evt.message));
});
window.addEventListener('resize', (evt) => {
window.addEventListener('resize', () => {
this.height = window.innerHeight;
this.width = window.innerWidth;
});
Expand Down
2 changes: 1 addition & 1 deletion api/web/src/stores/cots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export const useCOTStore = defineStore('cots', {

if (this.cots.has(cot.id)) {
diff.update.push({
id: render.id,
id: String(render.id),
addOrUpdateProperties: Object.keys(render.properties).map((key) => {
return { key, value: render.properties[key] }
}),
Expand Down
11 changes: 8 additions & 3 deletions api/web/src/stores/cots/cot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import pointOnFeature from '@turf/point-on-feature';
import moment from 'moment';
import type { Static } from '@sinclair/typebox';
import type { Feature } from './../../types.ts'
import type { Feature as GeoJSONFeature } from 'geojson'
import type {
Feature as GeoJSONFeature,
Geometry as GeoJSONGeometry,
} from 'geojson'

export default class COT implements Feature {
id: string;
Expand All @@ -25,8 +28,8 @@ export default class COT implements Feature {
* The slimmer we can get the Features, the better
* This returns the minium feature we need to actually style the COT in the vector tiles
*/
as_rendered(): GeoJSONFeature {
const feat: GeoJSONFeature = {
as_rendered(): GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>> {
const feat: GeoJSONFeature<GeoJSONGeometry, Record<string, unknown>> = {
id: this.id,
type: this.type,
properties: {
Expand All @@ -36,6 +39,8 @@ export default class COT implements Feature {
geometry: this.geometry
};

if (!feat.properties) feat.properties = {};

if (this.properties.fill !== undefined)
feat.properties.fill = this.properties.fill;
if (this.properties['fill-opacity'] !== undefined)
Expand Down

0 comments on commit 12744aa

Please sign in to comment.