diff --git a/js/filter/nofilter.js b/js/filter/nofilter.js new file mode 100644 index 00000000..0e41a3fc --- /dev/null +++ b/js/filter/nofilter.js @@ -0,0 +1,7 @@ +export function setupNoFilter() { + const manipulationTools = + document.getElementsByClassName("manipulation-tool"); + for (const tool of manipulationTools) { + tool.style.display = "none"; + } +} diff --git a/js/menu/filter/reconnect.js b/js/menu/filter/reconnect.js index 4ff272b6..28ccac22 100644 --- a/js/menu/filter/reconnect.js +++ b/js/menu/filter/reconnect.js @@ -6,11 +6,11 @@ export function reconnect(criteriaFunction, loadedObjects) { emptyCopyObject(loadedObjects, filteredObjects); - for (const [key, value] of Object.entries(loadedObjects.datatypes)) { - const filterFunction = objectTypes[key].filter; + const filterFunction = objectTypes["edm4hep::MCParticle"].filter; - filterFunction(value, filteredObjects.datatypes, criteriaFunction); - } + const mcParticles = loadedObjects.datatypes["edm4hep::MCParticle"]; + + filterFunction(mcParticles, filteredObjects.datatypes, criteriaFunction); return filteredObjects; } diff --git a/js/views/views-dictionary.js b/js/views/views-dictionary.js index 80384920..716983d1 100644 --- a/js/views/views-dictionary.js +++ b/js/views/views-dictionary.js @@ -14,6 +14,7 @@ import { recoClusterTrack, preFilterRecoClusterTrack, } from "./recoclustertrack.js"; +import { setupNoFilter } from "../filter/nofilter.js"; export const views = { "Monte Carlo Particle Tree": { @@ -23,43 +24,43 @@ export const views = { preFilterFunction: preFilterMCTree, }, "Reconstructed Particle Tree": { - filters: () => {}, + filters: setupNoFilter, viewFunction: recoParticleTree, scrollFunction: scrollTopLeft, preFilterFunction: preFilterRecoTree, }, "Track Tree": { - filters: () => {}, + filters: setupNoFilter, viewFunction: trackTree, scrollFunction: scrollTopCenter, preFilterFunction: preFilterTrackTree, }, "Cluster Tree": { - filters: () => {}, + filters: setupNoFilter, viewFunction: clusterTree, scrollFunction: scrollTopCenter, preFilterFunction: preFilterClusterTree, }, "Reco Particle-Cluster-Track": { - filters: () => {}, + filters: setupNoFilter, viewFunction: recoClusterTrack, scrollFunction: scrollTopCenter, preFilterFunction: preFilterRecoClusterTrack, }, "Monte Carlo-Reconstructed Particle": { - filters: () => {}, + filters: setupNoFilter, viewFunction: mcRecoAssociation, scrollFunction: scrollTopCenter, preFilterFunction: preFilterMCReco, }, "Monte Carlo Particle-Track": { - filters: () => {}, + filters: setupNoFilter, viewFunction: mcTrackAssociation, scrollFunction: scrollTopCenter, preFilterFunction: preFilterMCTrack, }, "Monte Carlo Particle-Cluster": { - filters: () => {}, + filters: setupNoFilter, viewFunction: mcClusterAssociation, scrollFunction: scrollTopCenter, preFilterFunction: preFilterMCCluster,