Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opacity #200

Merged
merged 15 commits into from
Jun 17, 2024
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

### Pending Release

- :rocket: `UI` Global Callsign now only shows as a single TextInput as newlines aren't respected
- :rocket: `API` `node-(cot|tak)` updated to latest version which uses GeoJSON simple style spec 0-1 opacity values
- :rocket: `UI/API` Update all Style Specs to use new 0-1 values
- :rocket: `UI` Add Point entry for `marker-opacity`

### v2.42.0 - 2024-06-13

- :rocket: `UI` Mission CoT updates will be posted to the correct Mission Layer
Expand Down
5 changes: 3 additions & 2 deletions api/lib/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const StyleLink = Type.Object({
});

export const StylePoint = Type.Object({
color: Type.Optional(Type.String()),
'marker-color': Type.Optional(Type.String()),
'marker-opacity': Type.Optional(Type.String()),
remarks: Type.Optional(Type.String()),
callsign: Type.Optional(Type.String()),
links: Type.Optional(Type.Array(StyleLink)),
Expand Down Expand Up @@ -128,7 +129,7 @@ export default class Style {
}
}


if (style.remarks) {
try {
handlebars.compile(style.remarks)({});
Expand Down
3,912 changes: 1,433 additions & 2,479 deletions api/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"@openaddresses/cloudfriend": "^7.0.0",
"@placemarkio/check-geojson": "^0.1.12",
"@sinclair/typebox": "^0.32.14",
"@tak-ps/node-cot": "^8.0.0",
"@tak-ps/node-tak": "^4.4.0",
"@tak-ps/node-cot": "^9.0.0",
"@tak-ps/node-tak": "^5.0.0",
"@turf/bbox-polygon": "^7.0.0",
"@turf/meta": "^7.0.0",
"ajv": "^8.11.2",
Expand Down Expand Up @@ -79,7 +79,7 @@
"spritesmith": "^3.4.1",
"swagger-ui-express": "^5.0.0",
"tough-cookie": "^4.1.2",
"tsx": "4.15.1",
"tsx": "^4.15.1",
"undici": "^6.0.0",
"vinyl": "^3.0.0",
"ws": "^8.11.0",
Expand Down
8 changes: 4 additions & 4 deletions api/test/style.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test('Style: Basic Point', async () => {
enabled_styles: true,
styles: {
point: {
color: '#ffffff',
'marker-color': '#ffffff',
remarks: 'Test Remarks'
}
}
Expand All @@ -24,7 +24,7 @@ test('Style: Basic Point', async () => {
}), {
type: 'Feature',
properties: {
color: '#ffffff',
'marker-color': '#ffffff',
remarks: 'Test Remarks',
metadata: {},
stale: 123000
Expand All @@ -42,7 +42,7 @@ test('Style: Basic Point: Disabled', async () => {
enabled_styles: false,
styles: {
point: {
color: '#ffffff',
'marker-color': '#ffffff',
remarks: 'Test Remarks'
}
}
Expand Down Expand Up @@ -73,7 +73,7 @@ test('Style: Basic Point: Stale only applied if stale is undefined on root featu
enabled_styles: false,
styles: {
point: {
color: '#ffffff',
'marker-color': '#ffffff',
remarks: 'Test Remarks'
}
}
Expand Down
Loading
Loading