layerchart
Advanced tools
Comparing version
@@ -20,3 +20,3 @@ import { SvelteComponentTyped } from "svelte"; | ||
node: { | ||
node: d3.HierarchyRectangularNode<unknown>; | ||
node: unknown; | ||
rect: { | ||
@@ -23,0 +23,0 @@ x: number; |
@@ -6,3 +6,3 @@ { | ||
"repository": "techniq/layerchart", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"devDependencies": { | ||
@@ -9,0 +9,0 @@ "@sveltejs/adapter-vercel": "^1.0.0-next.47", |
/** | ||
* This custom tiling function adapts the built-in binary tiling function | ||
* This custom tiling function adapts the tiling function | ||
* for the appropriate aspect ratio when the treemap is zoomed-in. | ||
@@ -7,1 +7,5 @@ * see: https://observablehq.com/@d3/zoomable-treemap#tile and https://observablehq.com/@d3/stretched-treemap | ||
export declare function aspectTile(tile: any, width: any, height: any): (node: any, x0: any, y0: any, x1: any, y1: any) => void; | ||
/** | ||
* Show if the node (a) is a child of the selected (b), or any parent above selected | ||
*/ | ||
export declare function isNodeVisible(a: any, b: any): boolean; |
/** | ||
* This custom tiling function adapts the built-in binary tiling function | ||
* This custom tiling function adapts the tiling function | ||
* for the appropriate aspect ratio when the treemap is zoomed-in. | ||
@@ -17,1 +17,12 @@ * see: https://observablehq.com/@d3/zoomable-treemap#tile and https://observablehq.com/@d3/stretched-treemap | ||
} | ||
/** | ||
* Show if the node (a) is a child of the selected (b), or any parent above selected | ||
*/ | ||
export function isNodeVisible(a, b) { | ||
while (b) { | ||
if (a.parent === b) | ||
return true; | ||
b = b.parent; | ||
} | ||
return false; | ||
} |
Sorry, the diff of this file is not supported yet
115368
0.37%1711
0.88%