layerchart 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,8 +61,8 @@ $: {
61
61
  }
62
62
  $: root = treemap($data);
63
63
  $: selected = root; // set initial selection
64
- // group nodes by height so can be rendered lowest to highest
65
- $: nodesByHeight = group(root, (d) => d.height);
64
+ // group nodes by depth so can be rendered lowest to highest
65
+ $: nodesByDepth = group(root, (d) => d.depth);
66
66
  const duration = 800;
67
67
  const extents = tweened(undefined, { easing: cubicOut, duration });
68
68
  $: $extents = selected
@@ -83,7 +83,7 @@ $: yScale = scaleLinear().domain([$extents.y0, $extents.y1]).rangeRound([0, $hei
83
83
  </script>
84
84
 
85
85
  <RectClipPath width={$width} height={$height}>
86
- {#each Array.from(nodesByHeight) as [height, nodes]}
86
+ {#each Array.from(nodesByDepth) as [depth, nodes]}
87
87
  <g>
88
88
  {#each nodes as node}
89
89
  <slot
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Sean Lynch <techniq35@gmail.com>",
4
4
  "license": "MIT",
5
5
  "repository": "techniq/layerchart",
6
- "version": "0.3.4",
6
+ "version": "0.3.5",
7
7
  "devDependencies": {
8
8
  "@sveltejs/adapter-vercel": "^1.0.0-next.47",
9
9
  "@sveltejs/kit": "^1.0.0-next.303",