mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Addressed @rndstr's comment.
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { Motion, spring } from 'react-motion';
|
||||
import { Map as makeMap } from 'immutable';
|
||||
import { line, curveBasis } from 'd3-shape';
|
||||
import { each, omit, times, constant } from 'lodash';
|
||||
import { each, times, constant } from 'lodash';
|
||||
|
||||
import { NODES_SPRING_ANIMATION_CONFIG } from '../constants/animation';
|
||||
import { NODE_BASE_SIZE, EDGE_WAYPOINTS_CAP } from '../constants/styles';
|
||||
@@ -70,8 +70,7 @@ export default class EdgeContainer extends React.PureComponent {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { isAnimated, waypoints } = this.props;
|
||||
const forwardedProps = omit(this.props, 'isAnimated', 'waypoints', 'scale');
|
||||
const { isAnimated, waypoints, scale, ...forwardedProps } = this.props;
|
||||
|
||||
if (!isAnimated) {
|
||||
return transformedEdge(forwardedProps, waypoints.toJS(), this.state.thickness);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import { omit } from 'lodash';
|
||||
import { Motion, spring } from 'react-motion';
|
||||
|
||||
import { NODES_SPRING_ANIMATION_CONFIG } from '../constants/animation';
|
||||
@@ -16,8 +15,7 @@ const transformedNode = (otherProps, { x, y, k }) => (
|
||||
|
||||
export default class NodeContainer extends React.PureComponent {
|
||||
render() {
|
||||
const { dx, dy, isAnimated, scale } = this.props;
|
||||
const forwardedProps = omit(this.props, 'dx', 'dy', 'isAnimated', 'scale');
|
||||
const { dx, dy, isAnimated, scale, ...forwardedProps } = this.props;
|
||||
|
||||
if (!isAnimated) {
|
||||
// Show static node for optimized rendering
|
||||
|
||||
Reference in New Issue
Block a user