Index

src/managers/ui-manager/index.ts

defaultAnimationPresets
Type : AnimationPreset[]
Default value : [ { name: 'Cavern to ID', positions: [ { position: [66388.95051168812, 5264.228603228927, -46910.7848593543], duration: 1000, }, { position: [12834.18729094943, 677.7571205763458, 135.68755273443463], duration: 2000, }, { position: [312.02688693297375, 25.884223757326, 270.10019006776236], duration: 3500, }, { position: [263.3640855132258, 19.874838262525053, -318.16541790248885], duration: 3000, }, { position: [5534.140362338047, 234.03507981484574, -2933.619479808285], duration: 2000, }, { position: [2681.277288705242, 646.5795158318147, 5628.5248735111745], duration: 1000, }, { position: [-6062.586283740076, 790.5876682946184, 1381.1675900848818], duration: 1000, }, { position: [-1766.7693725879053, 1007.1048030984678, -5928.901341784575], duration: 1000, }, { position: [12814.982506255355, 2516.987185037266, -22891.902734328327], duration: 1000, }, ], animateEventAfterInterval: 5000, collisionDuration: 6000, }, ]

If animation presets not passed in configuration, we will use this.

src/helpers/constants.ts

EVENT_DATA_TYPE_COLORS
Type : object
Default value : { Hits: new Color(0xff0000), Tracks: new Color(0xff0000), Jets: new Color(0x2194ce), CaloClusters: new Color(0xffd166), MuonChambers: new Color(0xff0000), Vertices: new Color(0xffd166), MissingEnergy: new Color(0xffffff), PlanarCaloCells: new Color(0xfff69a), }

Colors of different event data types.

src/helpers/browser-storage.ts

getFromLocalStorage
Default value : (item: string) => { try { return localStorage.getItem(item); } catch (exception) { console.warn('Exception in localStorage', exception); } }

Get an item from local storage.

setToLocalStorage
Default value : (item: string, value: string) => { try { localStorage.setItem(item, value); } catch (exception) { console.warn('Exception in localStorage', exception); } }

Set item to local storage.

src/helpers/labels.ts

getLabelTitle
Default value : ( eventDataType: string, collection: string, index: string | number, ) => `${eventDataType} > ${collection} > ${index}`

Get title of the label.

src/helpers/file.ts

loadFile
Default value : ( onFileRead: (data: string) => void, contentType: string = 'application/json', ) => { // Create a mock input file element and use that to read the file let inputFile = document.createElement('input'); inputFile.type = 'file'; inputFile.accept = contentType; inputFile.onchange = (e: any) => { const configFile = e.target?.files[0]; const reader = new FileReader(); reader.onload = (e) => { onFileRead?.(e.target.result.toString()); inputFile.remove(); inputFile = null; }; reader.readAsText(configFile); }; inputFile.click(); setTimeout(() => { console.log('Let us just wait a second'); }, 1000); }

Load a file from user by mocking an input element.

saveFile
Default value : ( data: string, fileName: string, contentType: string = 'application/json', ) => { const blob = new Blob([data], { type: contentType }); const tempAnchor = document.createElement('a'); tempAnchor.style.display = 'none'; tempAnchor.href = URL.createObjectURL(blob); tempAnchor.download = fileName; tempAnchor.click(); tempAnchor.remove(); }

Save and download file with the given data.

src/managers/url-options-manager.ts

phoenixURLOptions
Type : object
Default value : { file: '', type: '', config: '', hideWidgets: false, embed: false, }

Model for Phoenix URL options.

src/helpers/zip.ts

readZipFile
Default value : async (file: File | ArrayBuffer) => { const archive = new JSZip(); const filesWithData: { [fileName: string]: string } = {}; await archive.loadAsync(file); for (const filePath in archive.files) { const fileData = await archive.file(filePath).async('string'); filesWithData[filePath] = fileData; } return filesWithData; }

Read a zip file and return its contents as an object.

results matching ""

    No results matching ""