mirror of
https://github.com/Noratrieb/my-binary-is-thicc-af.git
synced 2026-01-14 19:55:07 +01:00
22 lines
No EOL
479 B
JavaScript
22 lines
No EOL
479 B
JavaScript
import './style.css'
|
|
import FoamTree from '@carrotsearch/foamtree';
|
|
import groups from './groups.json'
|
|
|
|
const appElem = document.getElementById('app');
|
|
console.log(appElem)
|
|
const foamtree = new FoamTree({
|
|
id: "app",
|
|
layout: 'squarified',
|
|
stacking: 'flattened',
|
|
dataObject: {
|
|
groups
|
|
},
|
|
});
|
|
|
|
window.addEventListener("resize", (() => {
|
|
let timeout;
|
|
return () => {
|
|
window.clearTimeout(timeout);
|
|
timeout = window.setTimeout(foamtree.resize, 300);
|
|
};
|
|
})()); |