layerchart 0.3.2 → 0.3.3
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.
|
@@ -8,7 +8,6 @@ import { cubicOut } from 'svelte/easing';
|
|
|
8
8
|
import * as d3 from 'd3-hierarchy';
|
|
9
9
|
import { scaleLinear } from 'd3-scale';
|
|
10
10
|
import { group } from 'd3-array';
|
|
11
|
-
import Group from './Group.svelte';
|
|
12
11
|
import RectClipPath from './RectClipPath.svelte';
|
|
13
12
|
import { aspectTile } from '../utils/treemap';
|
|
14
13
|
const { data, width, height } = getContext('LayerCake');
|
|
@@ -84,21 +83,16 @@ $: yScale = scaleLinear().domain([$extents.y0, $extents.y1]).rangeRound([0, $hei
|
|
|
84
83
|
{#each Array.from(nodesByHeight) as [height, nodes]}
|
|
85
84
|
<g>
|
|
86
85
|
{#each nodes as node}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
height: nodeHeight
|
|
98
|
-
}}
|
|
99
|
-
/>
|
|
100
|
-
</RectClipPath>
|
|
101
|
-
</Group>
|
|
86
|
+
<slot
|
|
87
|
+
name="node"
|
|
88
|
+
{node}
|
|
89
|
+
rect={{
|
|
90
|
+
x: xScale(node.x0),
|
|
91
|
+
y: yScale(node.y0),
|
|
92
|
+
width: xScale(node.x1) - xScale(node.x0),
|
|
93
|
+
height: yScale(node.y1) - yScale(node.y0)
|
|
94
|
+
}}
|
|
95
|
+
/>
|
|
102
96
|
{/each}
|
|
103
97
|
</g>
|
|
104
98
|
{/each}
|
|
@@ -16,13 +16,13 @@ declare const __propDef: {
|
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
17
17
|
};
|
|
18
18
|
slots: {
|
|
19
|
-
|
|
19
|
+
node: {
|
|
20
20
|
node: d3.HierarchyRectangularNode<unknown>;
|
|
21
21
|
rect: {
|
|
22
22
|
x: number;
|
|
23
23
|
y: number;
|
|
24
|
-
width:
|
|
25
|
-
height:
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
};
|
package/package.json
CHANGED