diff --git a/jsroot/jsroot_reader.mjs b/jsroot/jsroot_reader.mjs index 29e8bf0..3e9ed37 100644 --- a/jsroot/jsroot_reader.mjs +++ b/jsroot/jsroot_reader.mjs @@ -107,7 +107,10 @@ export function sortArrayOfNumbers(arr) { export function sortDeep(obj) { sortArrayOfNumbers(obj); // sort nums inside array - obj.forEach((value) => { if (Array.isArray(value)) sortArrayOfNumbers(value); }); // sort elements inside inner array + obj.forEach((value) => { + // sort elements inside inner array + if (Array.isArray(value)) sortArrayOfNumbers(value); + }); obj.sort((a, b) => { const len = Math.min(a.length, b.length); @@ -122,9 +125,7 @@ export function sortDeep(obj) { export function pairArrayToMap(arr) { // sort by key - arr.sort((a, b) => - String(a.first).localeCompare(String(b.first)), - ); + arr.sort((a, b) => String(a.first).localeCompare(String(b.first))); return Object.fromEntries( arr.map((p) => [ diff --git a/jsroot/structure/cluster_groups/read.mjs b/jsroot/structure/cluster_groups/read.mjs index 8ffe88a..5e22d92 100644 --- a/jsroot/structure/cluster_groups/read.mjs +++ b/jsroot/structure/cluster_groups/read.mjs @@ -1,15 +1,15 @@ import { read, isNewer } from "../../jsroot_reader.mjs"; if (!isNewer("7.11.1")) { - console.log(" -> Skipped structure/cluster_groups: version too low") + console.log(" -> Skipped structure/cluster_groups: version too low"); process.exit(); } -const fields = [ - "Int32", -]; +const fields = ["Int32"]; -const [input = "structure.cluster_groups.root", output = "structure.cluster_groups.json"] = - process.argv.slice(2); +const [ + input = "structure.cluster_groups.root", + output = "structure.cluster_groups.json", +] = process.argv.slice(2); read(input, output, fields); diff --git a/jsroot/structure/clusters/read.mjs b/jsroot/structure/clusters/read.mjs index da901ed..62624af 100644 --- a/jsroot/structure/clusters/read.mjs +++ b/jsroot/structure/clusters/read.mjs @@ -1,8 +1,6 @@ import { read } from "../../jsroot_reader.mjs"; -const fields = [ - "Int32", -]; +const fields = ["Int32"]; const [input = "structure.clusters.root", output = "structure.clusters.json"] = process.argv.slice(2); diff --git a/jsroot/structure/empty/read.mjs b/jsroot/structure/empty/read.mjs index 38b14ce..865ae81 100644 --- a/jsroot/structure/empty/read.mjs +++ b/jsroot/structure/empty/read.mjs @@ -1,7 +1,7 @@ import { read, isNewer } from "../../jsroot_reader.mjs"; if (!isNewer("7.11.1")) { - console.log(" -> Skipped structure/empty: version too low") + console.log(" -> Skipped structure/empty: version too low"); process.exit(); } diff --git a/jsroot/types/fundamental/integer/read.mjs b/jsroot/types/fundamental/integer/read.mjs index fd0ea50..83abb95 100644 --- a/jsroot/types/fundamental/integer/read.mjs +++ b/jsroot/types/fundamental/integer/read.mjs @@ -1,7 +1,7 @@ import { read, isNewer } from "../../../jsroot_reader.mjs"; if (!isNewer("7.11.1")) { - console.log(" -> Skipped types/fundamental/integer: version too low") + console.log(" -> Skipped types/fundamental/integer: version too low"); process.exit(); } @@ -27,7 +27,9 @@ const fields = [ "SplitUInt64", ]; -const [input = "types.fundamental.integer.root", output = "types.fundamental.integer.json"] = - process.argv.slice(2); +const [ + input = "types.fundamental.integer.root", + output = "types.fundamental.integer.json", +] = process.argv.slice(2); read(input, output, fields, checkBigInt, { marker: "__BIGINT__" }); // marker is used to write BigInts as string in JSON and then convert to number to avoid precision loss diff --git a/jsroot/types/fundamental/misc/read.mjs b/jsroot/types/fundamental/misc/read.mjs index 3410a8e..1b0f3ba 100644 --- a/jsroot/types/fundamental/misc/read.mjs +++ b/jsroot/types/fundamental/misc/read.mjs @@ -7,7 +7,9 @@ function convertToNum(value) { const fields = ["Bit", "Byte", "Char"]; -const [input = "types.fundamental.misc.root", output = "types.fundamental.misc.json"] = - process.argv.slice(2); +const [ + input = "types.fundamental.misc.root", + output = "types.fundamental.misc.json", +] = process.argv.slice(2); read(input, output, fields, convertToNum); diff --git a/jsroot/types/fundamental/real/read.mjs b/jsroot/types/fundamental/real/read.mjs index 9afd4fd..4e854fa 100644 --- a/jsroot/types/fundamental/real/read.mjs +++ b/jsroot/types/fundamental/real/read.mjs @@ -11,7 +11,9 @@ const fields = [ "DoubleSplitReal64", ]; -const [input = "types.fundamental.real.root", output = "types.fundamental.real.json"] = - process.argv.slice(2); +const [ + input = "types.fundamental.real.root", + output = "types.fundamental.real.json", +] = process.argv.slice(2); read(input, output, fields, floatToHex); diff --git a/jsroot/types/fundamental/real32quant/read.mjs b/jsroot/types/fundamental/real32quant/read.mjs index 631fa1c..1ddf5e4 100644 --- a/jsroot/types/fundamental/real32quant/read.mjs +++ b/jsroot/types/fundamental/real32quant/read.mjs @@ -1,7 +1,7 @@ import { read, floatToHex, isNewer } from "../../../jsroot_reader.mjs"; if (!isNewer("7.11.1")) { - console.log(" -> Skipped types/fundamental/real32quant: version too low") + console.log(" -> Skipped types/fundamental/real32quant: version too low"); process.exit(); } @@ -23,7 +23,9 @@ const fields = [ "DoubleReal32Quant32", ]; -const [input = "types.fundamental.real32quant.root", output = "types.fundamental.real32quant.json"] = - process.argv.slice(2); +const [ + input = "types.fundamental.real32quant.root", + output = "types.fundamental.real32quant.json", +] = process.argv.slice(2); read(input, output, fields, formatFloat); diff --git a/jsroot/types/fundamental/real32trunc/read.mjs b/jsroot/types/fundamental/real32trunc/read.mjs index ca98917..8a58680 100644 --- a/jsroot/types/fundamental/real32trunc/read.mjs +++ b/jsroot/types/fundamental/real32trunc/read.mjs @@ -9,7 +9,9 @@ const fields = [ "DoubleReal32Trunc31", ]; -const [input = "types.fundamental.real32trunc.root", output = "types.fundamental.real32trunc.json"] = - process.argv.slice(2); +const [ + input = "types.fundamental.real32trunc.root", + output = "types.fundamental.real32trunc.json", +] = process.argv.slice(2); read(input, output, fields, floatToHex); diff --git a/web/html/template.html b/web/html/template.html index 4e40d91..0cdc403 100644 --- a/web/html/template.html +++ b/web/html/template.html @@ -247,6 +247,10 @@

Validation-Suite

overlay.addEventListener('click', (e) => { if (e.target === overlay) closeModal(); }); + + document.addEventListener('keydown', (e) => { + if (e.key === 'Escape') closeModal(); + }); } // open modal and fill it with text