bugfix(heightmap): fixed profiles list for KevinOConnor/klipper#4598
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
94d445c9fe
commit
ef9b17a9f4
@ -529,14 +529,20 @@ export const getters: GetterTree<PrinterState, RootState> = {
|
|||||||
const value: any = state.configfile.settings[key.toLowerCase()]
|
const value: any = state.configfile.settings[key.toLowerCase()]
|
||||||
const nameSplit = key.split(" ")
|
const nameSplit = key.split(" ")
|
||||||
|
|
||||||
const points: number[] = []
|
let points: number[] = []
|
||||||
value.points.split("\n").forEach((row: string) => {
|
if (typeof value.points === "string") {
|
||||||
if (row !== "") {
|
value.points.split("\n").forEach((row: string) => {
|
||||||
row.split(', ').forEach((col: string) => {
|
if (row !== "") {
|
||||||
points.push(parseFloat(col))
|
row.split(', ').forEach((col: string) => {
|
||||||
})
|
points.push(parseFloat(col))
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
value.points.forEach((row: number[]) => {
|
||||||
|
points = points.concat(row)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const min = Math.min(...points)
|
const min = Math.min(...points)
|
||||||
const max = Math.max(...points)
|
const max = Math.max(...points)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user