No grey stacks for now

- May give the feeling something is not there when it should be, or
  incomplete.
- They create visual noise
This commit is contained in:
Simon Howe
2016-02-18 14:49:41 +01:00
parent 2c626776a1
commit 46e29c3f15
2 changed files with 3 additions and 9 deletions

View File

@@ -12,28 +12,24 @@ export default function NodeShapeStack(props) {
const propsOnlyHighlight = Object.assign({}, props, {onlyHighlight: true});
const Shape = props.shape;
const nodeCount = props.nodeCount;
const [dx, dy] = [0, 6];
const ds = 0.075;
const dsx = (props.size * 2 + dx) / (props.size * 2);
const dsy = (props.size * 2 + dy) / (props.size * 2);
const hls = [dsx, dsy];
const propsWithGrey = Object.assign({}, propsNoHighlight, {color: '#aaa', className: 'mock'});
const propsForIndex = i => (nodeCount < i ? propsWithGrey : propsNoHighlight);
return (
<g transform={`translate(${dx * -1}, ${dy * -1})`} className="stack">
<g transform={`translate(${dx * 2}, ${dy * 2}) scale(${1 - (2 * ds)}, ${1 - (2 * ds)})`}>
<Shape {...propsForIndex(3)} />
<Shape {...propsNoHighlight} />
</g>
<g transform={`translate(${dx * 1}, ${dy * 1}) scale(${1 - (1 * ds)}, ${1 - (1 * ds)})`}>
<Shape {...propsForIndex(2)} />
<Shape {...propsNoHighlight} />
</g>
<g transform={`translate(${dx * 0.5}, ${dy * 0.5}) scale(${hls})`} className="stack">
<Shape {...propsOnlyHighlight} />
</g>
<Shape {...propsForIndex(1)} />
<Shape {...propsNoHighlight} />
</g>
);
}

View File

@@ -42,8 +42,6 @@ function addAllVariants() {
});
}));
console.log(newNodes);
receiveNodesDelta({
add: newNodes
});