Skip to content

Commit

Permalink
Merge pull request #330 from patudom/2-size-modals
Browse files Browse the repository at this point in the history
2 size modals
  • Loading branch information
patudom authored Dec 20, 2023
2 parents 32b0ee8 + 08612e6 commit 8524d67
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions radwave/src/Radwave.vue
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,11 @@ export default defineComponent({
}
},
data() {
const phaseOpacitySlope = -1 / 80;
const phaseOpacityIntercept = 1 - phaseOpacitySlope * 100;
const initialOpacity = 0.5;
const fadeStartPhase = 100;
const fadeEndPhase = 180;
const phaseOpacitySlope = -initialOpacity / (fadeEndPhase - fadeStartPhase);
const phaseOpacityIntercept = initialOpacity * fadeEndPhase / (fadeEndPhase - fadeStartPhase);
const initial2DPosition = {
raRad: 6,
decRad: 1,
Expand Down Expand Up @@ -518,10 +521,13 @@ export default defineComponent({
phaseCol: 3,
clusterLayers: [] as SpreadSheetLayer[],
initialOpacity,
fadeStartPhase,
fadeEndPhase,
phaseOpacitySlope,
phaseOpacityIntercept,
clusterColor: "#1f3cf1",
defaultClusterDecay: 15,
defaultClusterDecay: 5,
sunColor: "#ffff0a",
sunLayer: null as SpreadSheetLayer | null,
Expand Down Expand Up @@ -906,10 +912,7 @@ export default defineComponent({
opacityForPhase(phase: number): number {
const adjustedPhase = 180 - Math.abs(180 - phase);
if (adjustedPhase <= 100) {
return 1;
}
return Math.min(Math.max(this.phaseOpacitySlope * adjustedPhase + this.phaseOpacityIntercept, 0), 1);
return Math.min(Math.max(this.phaseOpacitySlope * adjustedPhase + this.phaseOpacityIntercept, 0), this.initialOpacity);
},
setupClusterLayers(): Promise<SpreadSheetLayer[]> {
Expand All @@ -928,6 +931,7 @@ export default defineComponent({
layer.set_opacity(this.opacityForPhase(phase));
layer.set_color(color);
layer.set_scaleFactor(70);
//console.log(layer);
return layer;
});
});
Expand Down Expand Up @@ -1067,7 +1071,16 @@ export default defineComponent({
}
#modal-loading {
background-image: url("./assets/radwave_landing.png");
@media (max-width: 699px) {
background-image: url("./assets/radwave_landing_mobile.png");
}
@media (min-width: 700px) {
background-image: url("./assets/radwave_landing_desktop.png");
}
background-position: center;
background-size: 100%;
background-repeat: no-repeat;
Expand Down
Binary file removed radwave/src/assets/radwave_landing.png
Binary file not shown.
Binary file added radwave/src/assets/radwave_landing_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added radwave/src/assets/radwave_landing_mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8524d67

Please sign in to comment.