Skip to content

Commit

Permalink
Release commit created with Cranko.
Browse files Browse the repository at this point in the history
+++ cranko-release-info-v1
[[projects]]
qnames = ["@wwtelescope/research-app-messages", "npm"]
version = "0.17.0"
age = 9

[[projects]]
qnames = ["@wwtelescope/engine-types", "npm"]
version = "0.6.4"
age = 17

[[projects]]
qnames = ["@wwtelescope/engine", "npm"]
version = "7.28.1"
age = 0

[[projects]]
qnames = ["@wwtelescope/embed-common", "npm"]
version = "0.3.3"
age = 18

[[projects]]
qnames = ["@wwtelescope/embed-creator", "npm"]
version = "0.4.2"
age = 6

[[projects]]
qnames = ["@wwtelescope/astro", "npm"]
version = "0.2.2"
age = 19

[[projects]]
qnames = ["@wwtelescope/engine-helpers", "npm"]
version = "0.15.0"
age = 2

[[projects]]
qnames = ["@wwtelescope/engine-pinia", "npm"]
version = "0.7.0"
age = 2

[[projects]]
qnames = ["@wwtelescope/research-app", "npm"]
version = "0.15.0"
age = 0

[[projects]]
qnames = ["@wwtelescope/embed", "npm"]
version = "1.6.2"
age = 6

+++
  • Loading branch information
cranko committed Jul 1, 2023
2 parents cafa847 + 0a215c4 commit 2e19654
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 6 deletions.
6 changes: 6 additions & 0 deletions engine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# @wwtelescope/engine 7.28.1 (2023-07-01)

- Make sure that annotations properly rerender after their opacity is changed
(#259, @Carifio24).


# @wwtelescope/engine 7.28.0 (2023-06-26)

- Add support for rotating the view with two-finger touch gestures (#257, @Carifio24).
Expand Down
2 changes: 1 addition & 1 deletion engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
"uglify": "uglifyjs src/index.js -c -o src/index.min.js"
},
"types": "./src/index.d.ts",
"version": "7.28.0"
"version": "7.28.1"
}
6 changes: 5 additions & 1 deletion engine/wwtlib/Annotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ public static double Separation(double Alpha1, double Delta1, double Alpha2, dou
public double Opacity
{
get { return opacity; }
set { opacity = value; }
set
{
Annotation.BatchDirty = true;
opacity = value;
}
}
string id;

Expand Down
8 changes: 8 additions & 0 deletions research-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# @wwtelescope/research-app 0.15.0 (2023-07-01)

- Allow some grid overlay colors to be modified through JSON messages (#258,
@Carifio24). In particular, `altAzGridColor`, `eclipticColor`,
`eclipticGridColor`, `equatorialGridColor`, `galacticGridColor`, and
`precessionChartColor` are now handled as engine settings.


# @wwtelescope/research-app 0.14.4 (2023-06-08)

- Also ensure that catalog layer info is not a proxy (#253, @Carifio24).
Expand Down
2 changes: 1 addition & 1 deletion research-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@
"lint": "vue-cli-service lint src",
"serve": "vue-cli-service serve"
},
"version": "0.14.4"
"version": "0.15.0"
}
7 changes: 5 additions & 2 deletions research-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ import {
} from "@wwtelescope/research-app-messages";
import {
convertEngineSetting,
isResearchAppEngineSetting,
convertPywwtSpreadSheetLayerSetting,
convertSpreadSheetLayerSetting,
} from "./settings";
Expand Down Expand Up @@ -1970,9 +1972,10 @@ const App = defineComponent({
const setting: [string, any] = [msg.setting, msg.value];
if (!isEngineSetting(setting)) return false;
if (!isResearchAppEngineSetting(setting)) return false;
const convertedSetting = convertEngineSetting(setting);
this.applySetting(setting);
this.applySetting(convertedSetting);
return true;
},
Expand Down
48 changes: 47 additions & 1 deletion research-app/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import {
AltTypes,
AltUnits,
BaseEngineSetting,
CoordinatesType,
isBaseEngineSetting,
MarkerScales,
PlotTypes,
PointScaleTypes,
Expand All @@ -16,6 +18,7 @@ import {

import {
Color,
EngineSetting,
SpreadSheetLayer,
SpreadSheetLayerSetting,
} from "@wwtelescope/engine";
Expand All @@ -24,6 +27,31 @@ import {
classicPywwt,
} from "@wwtelescope/research-app-messages";


export type ResearchAppEngineSetting = BaseEngineSetting |
["altAzGridColor", string] |
["eclipticColor", string] |
["eclipticGridColor", string] |
["equatorialGridColor", string] |
["galacticGridColor", string] |
["precessionChartColor", string];

const researchAppEngineSettingTypeInfo = {
"altAzGridColor/string": true,
"eclipticColor/string": true,
"eclipticGridColor/string": true,
"equatorialGridColor/string": true,
"galacticGridColor/string": true,
"precessionChartColor/string": true,
};

export function isResearchAppEngineSetting(obj: [string, any]): obj is ResearchAppEngineSetting { // eslint-disable-line @typescript-eslint/no-explicit-any
if (isBaseEngineSetting(obj)) return true;

const key = obj[0] + "/" + typeof obj[1];
return (key in researchAppEngineSettingTypeInfo);
}

function colValToIndex(layer: SpreadSheetLayer, colval: number | string): number {
if (typeof colval === "number")
return colval;
Expand Down Expand Up @@ -136,4 +164,22 @@ export function convertSpreadSheetLayerSetting(setting: SpreadSheetLayerSetting)
}

return setting;
}
}

export function convertEngineSetting(setting: ResearchAppEngineSetting): EngineSetting {
if (setting[0] == "altAzGridColor") {
return [setting[0], Color.load(setting[1])];
} else if (setting[0] == "eclipticColor") {
return [setting[0], Color.load(setting[1])];
} else if (setting[0] == "eclipticGridColor") {
return [setting[0], Color.load(setting[1])];
} else if (setting[0] == "equatorialGridColor") {
return [setting[0], Color.load(setting[1])];
} else if (setting[0] == "galacticGridColor") {
return [setting[0], Color.load(setting[1])];
} else if (setting[0] == "precessionChartColor") {
return [setting[0], Color.load(setting[1])];
}

return setting;
}

0 comments on commit 2e19654

Please sign in to comment.