mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
[CodeFactor] Apply fixes to commit 4ea01f3
This commit is contained in:
parent
4ea01f39b4
commit
2abe3da834
2 changed files with 11 additions and 19 deletions
|
@ -170,7 +170,8 @@ const scatterChartData = computed(() => ({
|
||||||
var localSpectrum;
|
var localSpectrum;
|
||||||
//Define and generate a unique ID for canvas
|
//Define and generate a unique ID for canvas
|
||||||
const localSpectrumID = ref("");
|
const localSpectrumID = ref("");
|
||||||
localSpectrumID.value = "gridwfid-" + (Math.random() + 1).toString(36).substring(7);
|
localSpectrumID.value =
|
||||||
|
"gridwfid-" + (Math.random() + 1).toString(36).substring(7);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// This code will be executed after the component is mounted to the DOM
|
// This code will be executed after the component is mounted to the DOM
|
||||||
// You can access DOM elements or perform other initialization here
|
// You can access DOM elements or perform other initialization here
|
||||||
|
@ -179,20 +180,15 @@ onMounted(() => {
|
||||||
// init waterfall
|
// init waterfall
|
||||||
localSpectrum = initWaterfall(localSpectrumID.value);
|
localSpectrum = initWaterfall(localSpectrumID.value);
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"wf-data-avail",
|
"wf-data-avail",
|
||||||
function (evt) {
|
function (evt) {
|
||||||
localSpectrum.addData(evt.detail);
|
localSpectrum.addData(evt.detail);
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
setColormap(settings.local.wf_theme.valueOf);
|
setColormap(settings.local.wf_theme.valueOf);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ const scatterChartData = computed(() => ({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { initWaterfall,setColormap } from "../js/waterfallHandler.js";
|
import { initWaterfall, setColormap } from "../js/waterfallHandler.js";
|
||||||
var localSpectrum;
|
var localSpectrum;
|
||||||
export default {
|
export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -186,11 +186,7 @@ export default {
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
setColormap(settings.local.wf_theme.valueOf);
|
setColormap(settings.local.wf_theme.valueOf);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue