mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-22 14:09:46 +03:00
No need to re-assign
This commit is contained in:
parent
976e62c4ab
commit
71be671e6b
|
@ -164,23 +164,22 @@ export default function (DOMNode: HTMLElement, options: Partial<Options> = {}) {
|
|||
const root = d3.select(DOMNode);
|
||||
const zoom = d3.zoom<SVGSVGElement, unknown>().scaleExtent([0.1, 3]);
|
||||
|
||||
let svgElement = root
|
||||
const svgElement = root
|
||||
.append('svg')
|
||||
.attr('id', id)
|
||||
.attr('preserveAspectRatio', 'xMinYMin slice');
|
||||
.attr('preserveAspectRatio', 'xMinYMin slice')
|
||||
.style('cursor', '-webkit-grab');
|
||||
|
||||
if (!chartStyles.width) {
|
||||
svgElement = svgElement.attr('width', fullWidth);
|
||||
svgElement.attr('width', fullWidth);
|
||||
}
|
||||
|
||||
if (!chartStyles.width || !chartStyles.height) {
|
||||
svgElement = svgElement.attr('viewBox', `0 0 ${fullWidth} ${fullHeight}`);
|
||||
svgElement.attr('viewBox', `0 0 ${fullWidth} ${fullHeight}`);
|
||||
}
|
||||
|
||||
svgElement = svgElement.style('cursor', '-webkit-grab');
|
||||
|
||||
for (const [key, value] of Object.entries(chartStyles)) {
|
||||
svgElement = svgElement.style(key, value);
|
||||
svgElement.style(key, value);
|
||||
}
|
||||
|
||||
const vis = svgElement
|
||||
|
|
|
@ -95,13 +95,12 @@ export function tooltip<
|
|||
.style('position', 'absolute')
|
||||
.style('z-index', 1001)
|
||||
.style('left', `${x}px`)
|
||||
.style('top', `${y}px`);
|
||||
.style('top', `${y}px`)
|
||||
.html(() => text(node));
|
||||
|
||||
for (const [key, value] of Object.entries(styles)) {
|
||||
el = el.style(key, value);
|
||||
el.style(key, value);
|
||||
}
|
||||
|
||||
el = el.html(() => text(node));
|
||||
});
|
||||
|
||||
selection.on('mousemove.tip', (node) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user