mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 06:00:07 +03:00
Fix empty arrays
This commit is contained in:
parent
e50698b6e8
commit
a3ba875560
|
@ -2,9 +2,9 @@
|
|||
'd3tooltip': major
|
||||
---
|
||||
|
||||
- Remove UMD build
|
||||
- Upgrade d3 peer dependency from v3 to v4
|
||||
- Remove `attr` configuration method
|
||||
- Rename `style` configuration method to `styles` and move to options
|
||||
- Move `text` configuration method to options
|
||||
- Remove d3 parameter as first parameter for `tooltip`
|
||||
- Remove UMD build.
|
||||
- Upgrade d3 peer dependency from v3 to v4.
|
||||
- Remove `attr` configuration method.
|
||||
- Rename `style` configuration method to `styles` and move to options.
|
||||
- Move `text` configuration method to options.
|
||||
- Remove d3 parameter as first parameter for `tooltip`.
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
'map2tree': major
|
||||
---
|
||||
|
||||
Remove UMD build
|
||||
- Remove UMD build.
|
||||
|
|
|
@ -396,9 +396,9 @@ export default function (DOMNode: HTMLElement, options: Partial<Options> = {}) {
|
|||
.style('stroke', 'black')
|
||||
.style('stroke-width', '1.5px')
|
||||
.style('fill', (d) =>
|
||||
d.data._children
|
||||
d.data._children && d.data._children.length > 0
|
||||
? nodeStyleOptions.colors.collapsed
|
||||
: d.data.children
|
||||
: d.data.children && d.data.children.length > 0
|
||||
? nodeStyleOptions.colors.parent
|
||||
: nodeStyleOptions.colors.default
|
||||
);
|
||||
|
@ -418,7 +418,9 @@ export default function (DOMNode: HTMLElement, options: Partial<Options> = {}) {
|
|||
.style('fill-opacity', 1)
|
||||
.attr('transform', function transform(d) {
|
||||
const x =
|
||||
(d.data.children || d.data._children ? -1 : 1) *
|
||||
(((d.data.children ?? d.data._children)?.length ?? 0) > 0
|
||||
? -1
|
||||
: 1) *
|
||||
(this.getBBox().width / 2 + nodeStyleOptions.radius + 5);
|
||||
return `translate(${x},0)`;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user