mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Remove setTimeout and old comment from MeshGraph.js.
This commit is contained in:
@@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
|
|||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import debounce from 'util/debounce';
|
import debounce from 'util/debounce';
|
||||||
// import { t } from '@lingui/macro';
|
|
||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
import Legend from './Legend';
|
import Legend from './Legend';
|
||||||
import Tooltip from './Tooltip';
|
import Tooltip from './Tooltip';
|
||||||
@@ -195,23 +194,20 @@ function MeshGraph({ data, showLegend, zoom, setShowZoomControls }) {
|
|||||||
svg.call(zoom);
|
svg.call(zoom);
|
||||||
|
|
||||||
function highlightSiblings(n) {
|
function highlightSiblings(n) {
|
||||||
setTimeout(() => {
|
svg
|
||||||
|
.select(`circle.id-${n.id}`)
|
||||||
|
.attr('fill', DEFAULT_NODE_HIGHLIGHT_COLOR);
|
||||||
|
const immediate = links.filter(
|
||||||
|
(l) =>
|
||||||
|
n.hostname === l.source.hostname || n.hostname === l.target.hostname
|
||||||
|
);
|
||||||
|
immediate.forEach((s) => {
|
||||||
svg
|
svg
|
||||||
.select(`circle.id-${n.id}`)
|
.selectAll(`.link-${s.index}`)
|
||||||
.attr('fill', DEFAULT_NODE_HIGHLIGHT_COLOR);
|
.transition()
|
||||||
const immediate = links.filter(
|
.style('stroke', '#0066CC')
|
||||||
(l) =>
|
.style('stroke-width', '3px');
|
||||||
n.hostname === l.source.hostname ||
|
});
|
||||||
n.hostname === l.target.hostname
|
|
||||||
);
|
|
||||||
immediate.forEach((s) => {
|
|
||||||
svg
|
|
||||||
.selectAll(`.link-${s.index}`)
|
|
||||||
.transition()
|
|
||||||
.style('stroke', '#0066CC')
|
|
||||||
.style('stroke-width', '3px');
|
|
||||||
});
|
|
||||||
}, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function deselectSiblings(n) {
|
function deselectSiblings(n) {
|
||||||
|
|||||||
Reference in New Issue
Block a user