Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jpellizzari committed Mar 10, 2017
1 parent 8271bf6 commit 4dac969
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion client/app/scripts/charts/edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Edge extends React.Component {
const className = classNames('edge', { highlighted, blurred, focused });
const thickness = scale * (contrastMode ? 0.02 : 0.01) * NODE_BASE_SIZE;
const strokeWidth = focused ? thickness * 3 : thickness;
const shouldRenderMarker = true; //(focused || highlighted) && (source !== target);
const shouldRenderMarker = (focused || highlighted) && (source !== target);
// Draws the edge so that its thickness reflects the zoom scale.
// Edge shadow is always made 10x thicker than the edge itself.
return (
Expand Down
12 changes: 2 additions & 10 deletions client/app/scripts/charts/nodes-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,9 @@ class NodesChart extends React.Component {
const { panTranslateX, panTranslateY, zoomScale } = this.state;
const transform = `translate(${panTranslateX}, ${panTranslateY}) scale(${zoomScale})`;
const svgClassNames = this.props.isEmpty ? 'hide' : '';
const markerOffset = this.props.selectedNodeId ? '50' : '50';
const markerOffset = this.props.selectedNodeId ? '45' : '60';
const markerSize = this.props.selectedNodeId ? '10' : '20';

console.log(zoomScale);
return (
<div className="nodes-chart">
<svg
Expand All @@ -101,14 +100,7 @@ class NodesChart extends React.Component {
offset={markerOffset}
size={markerSize}
>
<polygon className="link" points="10 0, 10 7, 0 3.5" />
</Marker>
<Marker
id="end-arrow"
offset={markerOffset}
size={markerSize}
>
<polygon className="link" points="10 0, 10 7, 0 3.5" />
<polygon className="link" points="0 0, 10 3.5, 0 7" />
</Marker>
</defs>
<g transform="translate(24,24) scale(0.25)">
Expand Down

0 comments on commit 4dac969

Please sign in to comment.